changeset 441:2a08466838d3

Don't use methods not available in Java 5
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 26 Apr 2012 12:42:32 +0200
parents 299870249a28
children 6865eb742883
files src/org/tmatesoft/hg/internal/InflaterDataAccess.java src/org/tmatesoft/hg/repo/HgRemoteRepository.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/InflaterDataAccess.java	Thu Apr 19 19:18:25 2012 +0200
+++ b/src/org/tmatesoft/hg/internal/InflaterDataAccess.java	Thu Apr 26 12:42:32 2012 +0200
@@ -96,7 +96,7 @@
 					c += inflater.inflate(dummy, 0, dummy.length);
 				}
 			} catch (DataFormatException ex) {
-				throw new IOException(ex);
+				throw new IOException(ex.toString());
 			}
 		}
 		decompressedLength = c + oldPos;
--- a/src/org/tmatesoft/hg/repo/HgRemoteRepository.java	Thu Apr 19 19:18:25 2012 +0200
+++ b/src/org/tmatesoft/hg/repo/HgRemoteRepository.java	Thu Apr 26 12:42:32 2012 +0200
@@ -153,7 +153,7 @@
 					r = new BufferedReader(new InputStreamReader(c.getInputStream(), "US-ASCII"));
 					line = r.readLine();
 					c.disconnect();
-					if (line == null || line.trim().isEmpty()) {
+					if (line == null || line.trim().length() == 0) {
 						return true;
 					}
 				} else {