LUCENE-2842: avoid java6-only String.isEmpty in rule parser

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1055906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-01-06 15:07:12 +00:00
parent 66d3f38d52
commit fbfb07d904
1 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ public abstract class RSLPStemmerBase {
} }
private static String[] parseList(String s) { private static String[] parseList(String s) {
if (s.isEmpty()) if (s.length() == 0)
return null; return null;
String list[] = s.split(","); String list[] = s.split(",");
for (int i = 0; i < list.length; i++) for (int i = 0; i < list.length; i++)
@ -337,7 +337,7 @@ public abstract class RSLPStemmerBase {
String line = null; String line = null;
while ((line = r.readLine()) != null) { while ((line = r.readLine()) != null) {
line = line.trim(); line = line.trim();
if (!line.isEmpty() && line.charAt(0) != '#') if (line.length() > 0 && line.charAt(0) != '#')
return line; return line;
} }
return line; return line;