Removed call to Java 1.6 String.isEmpty() method, since we are supporting Java 1.5.
This commit is contained in:
parent
56ef6da161
commit
966a198bcf
1 changed files with 7 additions and 2 deletions
|
@ -11,7 +11,8 @@ public class StringUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String quote(String s) {
|
public static String quote(String s) {
|
||||||
return s.isEmpty() ? "" : '"' + s + '"';
|
boolean b = s.isEmpty();
|
||||||
|
return isEmpty(s) ? "" : '"' + s + '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String join(List<?> list, boolean quote, String glue) {
|
public static String join(List<?> list, boolean quote, String glue) {
|
||||||
|
@ -41,5 +42,9 @@ public class StringUtils {
|
||||||
public static String quotedList(List<?> list, String glue) {
|
public static String quotedList(List<?> list, String glue) {
|
||||||
|
|
||||||
return join(list, true, glue);
|
return join(list, true, glue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isEmpty(String s) {
|
||||||
|
return s == null || s.length() <= 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue