diff --git a/src/test/org/apache/lucene/queryParser/TestQueryParser.java b/src/test/org/apache/lucene/queryParser/TestQueryParser.java index 45fe0f69fc4..1bd4f23c4f2 100644 --- a/src/test/org/apache/lucene/queryParser/TestQueryParser.java +++ b/src/test/org/apache/lucene/queryParser/TestQueryParser.java @@ -506,7 +506,7 @@ public class TestQueryParser extends LocalizedTestCase { } private String escapeDateString(String s) { - if (s.contains(" ")) { + if (s.indexOf(" ") > -1) { return "\"" + s + "\""; } else { return s;