From fbfb07d90490f1ee37ab476232abecbd73975562 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 6 Jan 2011 15:07:12 +0000 Subject: [PATCH] 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 --- .../java/org/apache/lucene/analysis/pt/RSLPStemmerBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/RSLPStemmerBase.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/RSLPStemmerBase.java index e27f6d35137..2fb7a1f236e 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/RSLPStemmerBase.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/RSLPStemmerBase.java @@ -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;