fix #14 avoid using String#isEmpty for Android support

This commit is contained in:
Naoyuki Kanezawa
2014-07-09 23:52:54 +09:00
parent 85591d23cd
commit 02bda39187
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ public class Url {
} }
String path = uri.getPath(); String path = uri.getPath();
if (path == null || path.isEmpty()) { if (path == null || path.length() == 0) {
uri = uri.resolve("/"); uri = uri.resolve("/");
} }

View File

@@ -97,7 +97,7 @@ public class Parser {
str.append("-"); str.append("-");
} }
if (obj.nsp != null && !obj.nsp.isEmpty() && !"/".equals(obj.nsp)) { if (obj.nsp != null && obj.nsp.length() != 0 && !"/".equals(obj.nsp)) {
nsp = true; nsp = true;
str.append(obj.nsp); str.append(obj.nsp);
} }