From 966a198bcf395d225263b46ef52e4ad6c67355b4 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Mon, 22 Mar 2010 19:01:53 +0000 Subject: [PATCH] Removed call to Java 1.6 String.isEmpty() method, since we are supporting Java 1.5. --- .../cornell/mannlib/vitro/webapp/utils/StringUtils.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/StringUtils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/StringUtils.java index 838931105..9b701b22d 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/StringUtils.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/StringUtils.java @@ -11,7 +11,8 @@ public class StringUtils { } 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) { @@ -41,5 +42,9 @@ public class StringUtils { public static String quotedList(List list, String glue) { return join(list, true, glue); - } + } + + public static boolean isEmpty(String s) { + return s == null || s.length() <= 0; + } }