fix #14 avoid using String#isEmpty for Android support
This commit is contained in:
@@ -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("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user