mirror of https://github.com/apache/lucene.git
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:
parent
66d3f38d52
commit
fbfb07d904
|
@ -321,7 +321,7 @@ public abstract class RSLPStemmerBase {
|
|||
}
|
||||
|
||||
private static String[] parseList(String s) {
|
||||
if (s.isEmpty())
|
||||
if (s.length() == 0)
|
||||
return null;
|
||||
String list[] = s.split(",");
|
||||
for (int i = 0; i < list.length; i++)
|
||||
|
@ -337,7 +337,7 @@ public abstract class RSLPStemmerBase {
|
|||
String line = null;
|
||||
while ((line = r.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if (!line.isEmpty() && line.charAt(0) != '#')
|
||||
if (line.length() > 0 && line.charAt(0) != '#')
|
||||
return line;
|
||||
}
|
||||
return line;
|
||||
|
|
Loading…
Reference in New Issue