lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r960371 - /lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java
Date Sun, 04 Jul 2010 17:55:17 GMT
Author: uschindler
Date: Sun Jul  4 17:55:17 2010
New Revision: 960371

URL: http://svn.apache.org/viewvc?rev=960371&view=rev
Log:
Generics Police: Fix unchecked warning

Modified:
    lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java?rev=960371&r1=960370&r2=960371&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java Sun Jul
 4 17:55:17 2010
@@ -163,10 +163,10 @@ public class TestFieldsReader extends Lu
     FieldsReader reader = new FieldsReader(dir, TEST_SEGMENT_NAME, fieldInfos);
     assertTrue(reader != null);
     assertTrue(reader.size() == 1);
-    Set loadFieldNames = new HashSet();
+    Set<String> loadFieldNames = new HashSet<String>();
     loadFieldNames.add(DocHelper.TEXT_FIELD_1_KEY);
     loadFieldNames.add(DocHelper.TEXT_FIELD_UTF1_KEY);
-    Set lazyFieldNames = new HashSet();
+    Set<String> lazyFieldNames = new HashSet<String>();
     //new String[]{DocHelper.LARGE_LAZY_FIELD_KEY, DocHelper.LAZY_FIELD_KEY, DocHelper.LAZY_FIELD_BINARY_KEY};
     lazyFieldNames.add(DocHelper.LARGE_LAZY_FIELD_KEY);
     lazyFieldNames.add(DocHelper.LAZY_FIELD_KEY);
@@ -177,7 +177,7 @@ public class TestFieldsReader extends Lu
     SetBasedFieldSelector fieldSelector = new SetBasedFieldSelector(loadFieldNames, lazyFieldNames)
{
         public FieldSelectorResult accept(String fieldName) {
           final FieldSelectorResult result = super.accept(fieldName);
-          if (result.equals(FieldSelectorResult.LAZY_LOAD)) {
+          if (result == FieldSelectorResult.LAZY_LOAD) {
             return FieldSelectorResult.LATENT;
           } else {
             return result;



Mime
View raw message