lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1576837 [13/29] - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/analysis/ lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/ lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/ lucene/analysis/co...
Date Wed, 12 Mar 2014 18:14:27 GMT
Modified: lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java (original)
+++ lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java Wed Mar 12 18:14:05 2014
@@ -485,7 +485,7 @@ public class TestJoinUtil extends Lucene
     IndexIterationContext context = new IndexIterationContext();
     int numRandomValues = nDocs / 2;
     context.randomUniqueValues = new String[numRandomValues];
-    Set<String> trackSet = new HashSet<String>();
+    Set<String> trackSet = new HashSet<>();
     context.randomFrom = new boolean[numRandomValues];
     for (int i = 0; i < numRandomValues; i++) {
       String uniqueRandomValue;
@@ -573,7 +573,7 @@ public class TestJoinUtil extends Lucene
         toField = "from";
         queryVals = context.toHitsToJoinScore;
       }
-      final Map<BytesRef, JoinScore> joinValueToJoinScores = new HashMap<BytesRef, JoinScore>();
+      final Map<BytesRef, JoinScore> joinValueToJoinScores = new HashMap<>();
       if (multipleValuesPerDocument) {
         fromSearcher.search(new TermQuery(new Term("value", uniqueRandomValue)), new Collector() {
 
@@ -651,7 +651,7 @@ public class TestJoinUtil extends Lucene
         });
       }
 
-      final Map<Integer, JoinScore> docToJoinScore = new HashMap<Integer, JoinScore>();
+      final Map<Integer, JoinScore> docToJoinScore = new HashMap<>();
       if (multipleValuesPerDocument) {
         if (scoreDocsInOrder) {
           AtomicReader slowCompositeReader = SlowCompositeReaderWrapper.wrap(toSearcher.getIndexReader());
@@ -659,7 +659,7 @@ public class TestJoinUtil extends Lucene
           if (terms != null) {
             DocsEnum docsEnum = null;
             TermsEnum termsEnum = null;
-            SortedSet<BytesRef> joinValues = new TreeSet<BytesRef>(BytesRef.getUTF8SortedAsUnicodeComparator());
+            SortedSet<BytesRef> joinValues = new TreeSet<>(BytesRef.getUTF8SortedAsUnicodeComparator());
             joinValues.addAll(joinValueToJoinScores.keySet());
             for (BytesRef joinValue : joinValues) {
               termsEnum = terms.iterator(termsEnum);
@@ -764,7 +764,7 @@ public class TestJoinUtil extends Lucene
     } else {
       hitsToJoinScores = context.toHitsToJoinScore.get(queryValue);
     }
-    List<Map.Entry<Integer,JoinScore>> hits = new ArrayList<Map.Entry<Integer, JoinScore>>(hitsToJoinScores.entrySet());
+    List<Map.Entry<Integer,JoinScore>> hits = new ArrayList<>(hitsToJoinScores.entrySet());
     Collections.sort(hits, new Comparator<Map.Entry<Integer, JoinScore>>() {
 
       @Override
@@ -827,13 +827,13 @@ public class TestJoinUtil extends Lucene
 
     String[] randomUniqueValues;
     boolean[] randomFrom;
-    Map<String, List<RandomDoc>> fromDocuments = new HashMap<String, List<RandomDoc>>();
-    Map<String, List<RandomDoc>> toDocuments = new HashMap<String, List<RandomDoc>>();
-    Map<String, List<RandomDoc>> randomValueFromDocs = new HashMap<String, List<RandomDoc>>();
-    Map<String, List<RandomDoc>> randomValueToDocs = new HashMap<String, List<RandomDoc>>();
+    Map<String, List<RandomDoc>> fromDocuments = new HashMap<>();
+    Map<String, List<RandomDoc>> toDocuments = new HashMap<>();
+    Map<String, List<RandomDoc>> randomValueFromDocs = new HashMap<>();
+    Map<String, List<RandomDoc>> randomValueToDocs = new HashMap<>();
 
-    Map<String, Map<Integer, JoinScore>> fromHitsToJoinScore = new HashMap<String, Map<Integer, JoinScore>>();
-    Map<String, Map<Integer, JoinScore>> toHitsToJoinScore = new HashMap<String, Map<Integer, JoinScore>>();
+    Map<String, Map<Integer, JoinScore>> fromHitsToJoinScore = new HashMap<>();
+    Map<String, Map<Integer, JoinScore>> toHitsToJoinScore = new HashMap<>();
 
   }
 
@@ -847,7 +847,7 @@ public class TestJoinUtil extends Lucene
     private RandomDoc(String id, int numberOfLinkValues, String value, boolean from) {
       this.id = id;
       this.from = from;
-      linkValues = new ArrayList<String>(numberOfLinkValues);
+      linkValues = new ArrayList<>(numberOfLinkValues);
       this.value = value;
     }
   }

Modified: lucene/dev/branches/branch_4x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (original)
+++ lucene/dev/branches/branch_4x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java Wed Mar 12 18:14:05 2014
@@ -195,7 +195,7 @@ import org.apache.lucene.util.RecyclingI
 public class MemoryIndex {
 
   /** info for each field: Map<String fieldName, Info field> */
-  private final HashMap<String,Info> fields = new HashMap<String,Info>();
+  private final HashMap<String,Info> fields = new HashMap<>();
   
   /** fields sorted ascending by fieldName; lazily computed on demand */
   private transient Map.Entry<String,Info>[] sortedFields; 
@@ -209,7 +209,7 @@ public class MemoryIndex {
 //  private final IntBlockPool.SliceReader postingsReader;
   private final IntBlockPool.SliceWriter postingsWriter;
   
-  private HashMap<String,FieldInfo> fieldInfos = new HashMap<String,FieldInfo>();
+  private HashMap<String,FieldInfo> fieldInfos = new HashMap<>();
 
   private Counter bytesUsed;
   

Modified: lucene/dev/branches/branch_4x/lucene/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java Wed Mar 12 18:14:05 2014
@@ -84,7 +84,7 @@ import static org.hamcrest.CoreMatchers.
  * returning the same results for queries on some randomish indexes.
  */
 public class MemoryIndexTest extends BaseTokenStreamTestCase {
-  private Set<String> queries = new HashSet<String>();
+  private Set<String> queries = new HashSet<>();
   
   public static final int ITERATIONS = 100 * RANDOM_MULTIPLIER;
 
@@ -99,7 +99,7 @@ public class MemoryIndexTest extends Bas
    * read a set of queries from a resource file
    */
   private Set<String> readQueries(String resource) throws IOException {
-    Set<String> queries = new HashSet<String>();
+    Set<String> queries = new HashSet<>();
     InputStream stream = getClass().getResourceAsStream(resource);
     BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
     String line = null;
@@ -377,7 +377,7 @@ public class MemoryIndexTest extends Bas
   // LUCENE-3831
   public void testNullPointerException() throws IOException {
     RegexpQuery regex = new RegexpQuery(new Term("field", "worl."));
-    SpanQuery wrappedquery = new SpanMultiTermQueryWrapper<RegexpQuery>(regex);
+    SpanQuery wrappedquery = new SpanMultiTermQueryWrapper<>(regex);
         
     MemoryIndex mindex = new MemoryIndex(random().nextBoolean(),  random().nextInt(50) * 1024 * 1024);
     mindex.addField("field", new MockAnalyzer(random()).tokenStream("field", "hello there"));
@@ -389,7 +389,7 @@ public class MemoryIndexTest extends Bas
   // LUCENE-3831
   public void testPassesIfWrapped() throws IOException {
     RegexpQuery regex = new RegexpQuery(new Term("field", "worl."));
-    SpanQuery wrappedquery = new SpanOrQuery(new SpanMultiTermQueryWrapper<RegexpQuery>(regex));
+    SpanQuery wrappedquery = new SpanOrQuery(new SpanMultiTermQueryWrapper<>(regex));
 
     MemoryIndex mindex = new MemoryIndex(random().nextBoolean(),  random().nextInt(50) * 1024 * 1024);
     mindex.addField("field", new MockAnalyzer(random()).tokenStream("field", "hello there"));

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/document/LazyDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/document/LazyDocument.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/document/LazyDocument.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/document/LazyDocument.java Wed Mar 12 18:14:05 2014
@@ -44,8 +44,8 @@ public class LazyDocument {
   // null until first field is loaded
   private Document doc;
 
-  private Map<Integer,List<LazyField>> fields = new HashMap<Integer,List<LazyField>>();
-  private Set<String> fieldNames = new HashSet<String>();
+  private Map<Integer,List<LazyField>> fields = new HashMap<>();
+  private Set<String> fieldNames = new HashSet<>();
 
   public LazyDocument(IndexReader reader, int docID) {
     this.reader = reader;
@@ -72,7 +72,7 @@ public class LazyDocument {
     fieldNames.add(fieldInfo.name);
     List<LazyField> values = fields.get(fieldInfo.number);
     if (null == values) {
-      values = new ArrayList<LazyField>();
+      values = new ArrayList<>();
       fields.put(fieldInfo.number, values);
     } 
 

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/IndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/IndexSplitter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/IndexSplitter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/IndexSplitter.java Wed Mar 12 18:14:05 2014
@@ -73,14 +73,14 @@ public class IndexSplitter {
     if (args[1].equals("-l")) {
       is.listSegments();
     } else if (args[1].equals("-d")) {
-      List<String> segs = new ArrayList<String>();
+      List<String> segs = new ArrayList<>();
       for (int x = 2; x < args.length; x++) {
         segs.add(args[x]);
       }
       is.remove(segs.toArray(new String[0]));
     } else {
       File targetDir = new File(args[1]);
-      List<String> segs = new ArrayList<String>();
+      List<String> segs = new ArrayList<>();
       for (int x = 2; x < args.length; x++) {
         segs.add(args[x]);
       }

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java Wed Mar 12 18:14:05 2014
@@ -118,7 +118,7 @@ public class MultiPassIndexSplitter {
       System.err.println("\t-seq\tsequential docid-range split (default is round-robin)");
       System.exit(-1);
     }
-    ArrayList<IndexReader> indexes = new ArrayList<IndexReader>();
+    ArrayList<IndexReader> indexes = new ArrayList<>();
     String outDir = null;
     int numParts = -1;
     boolean seq = false;

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/util/fst/ListOfOutputs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/util/fst/ListOfOutputs.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/util/fst/ListOfOutputs.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/java/org/apache/lucene/util/fst/ListOfOutputs.java Wed Mar 12 18:14:05 2014
@@ -90,7 +90,7 @@ public final class ListOfOutputs<T> exte
       return outputs.add((T) prefix, (T) output);
     } else {
       List<T> outputList = (List<T>) output;
-      List<T> addedList = new ArrayList<T>(outputList.size());
+      List<T> addedList = new ArrayList<>(outputList.size());
       for(T _output : outputList) {
         addedList.add(outputs.add((T) prefix, _output));
       }
@@ -129,7 +129,7 @@ public final class ListOfOutputs<T> exte
     if (count == 1) {
       return outputs.read(in);
     } else {
-      List<T> outputList = new ArrayList<T>(count);
+      List<T> outputList = new ArrayList<>(count);
       for(int i=0;i<count;i++) {
         outputList.add(outputs.read(in));
       }
@@ -165,7 +165,7 @@ public final class ListOfOutputs<T> exte
 
   @Override
   public Object merge(Object first, Object second) {
-    List<T> outputList = new ArrayList<T>();
+    List<T> outputList = new ArrayList<>();
     if (!(first instanceof List)) {
       outputList.add((T) first);
     } else {
@@ -188,7 +188,7 @@ public final class ListOfOutputs<T> exte
 
   public List<T> asList(Object output) { 
     if (!(output instanceof List)) {
-      List<T> result = new ArrayList<T>(1);
+      List<T> result = new ArrayList<>(1);
       result.add((T) output);
       return result;
     } else {

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/document/TestLazyDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/document/TestLazyDocument.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/document/TestLazyDocument.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/document/TestLazyDocument.java Wed Mar 12 18:14:05 2014
@@ -94,7 +94,7 @@ public class TestLazyDocument extends Lu
       Document d = visitor.doc;
 
       int numFieldValues = 0;
-      Map<String,Integer> fieldValueCounts = new HashMap<String,Integer>();
+      Map<String,Integer> fieldValueCounts = new HashMap<>();
 
       // at this point, all FIELDS should be Lazy and unrealized
       for (IndexableField f : d) {
@@ -195,7 +195,7 @@ public class TestLazyDocument extends Lu
 
     LazyTestingStoredFieldVisitor(LazyDocument l, String... fields) {
       lazyDoc = l;
-      lazyFieldNames = new HashSet<String>(Arrays.asList(fields));
+      lazyFieldNames = new HashSet<>(Arrays.asList(fields));
     }
 
     @Override

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/IndexSortingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/IndexSortingTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/IndexSortingTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/IndexSortingTest.java Wed Mar 12 18:14:05 2014
@@ -43,7 +43,7 @@ public class IndexSortingTest extends So
     // only read the values of the undeleted documents, since after addIndexes,
     // the deleted ones will be dropped from the index.
     Bits liveDocs = reader.getLiveDocs();
-    List<Integer> values = new ArrayList<Integer>();
+    List<Integer> values = new ArrayList<>();
     for (int i = 0; i < reader.maxDoc(); i++) {
       if (liveDocs == null || liveDocs.get(i)) {
         values.add(Integer.valueOf(reader.document(i).get(ID_FIELD)));

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/SorterTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/SorterTestBase.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/SorterTestBase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/SorterTestBase.java Wed Mar 12 18:14:05 2014
@@ -196,7 +196,7 @@ public abstract class SorterTestBase ext
 
   /** Creates an index for sorting. */
   public static void createIndex(Directory dir, int numDocs, Random random) throws IOException {
-    List<Integer> ids = new ArrayList<Integer>();
+    List<Integer> ids = new ArrayList<>();
     for (int i = 0; i < numDocs; i++) {
       ids.add(Integer.valueOf(i * 10));
     }

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestBlockJoinSorter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestBlockJoinSorter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestBlockJoinSorter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestBlockJoinSorter.java Wed Mar 12 18:14:05 2014
@@ -75,7 +75,7 @@ public class TestBlockJoinSorter extends
     final StringField parent = new StringField("parent", "true", Store.YES);
     parentDoc.add(parent);
     for (int i = 0; i < numParents; ++i) {
-      List<Document> documents = new ArrayList<Document>();
+      List<Document> documents = new ArrayList<>();
       final int numChildren = random().nextInt(10);
       for (int j = 0; j < numChildren; ++j) {
         final Document childDoc = new Document();

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestEarlyTermination.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestEarlyTermination.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestEarlyTermination.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestEarlyTermination.java Wed Mar 12 18:14:05 2014
@@ -75,11 +75,11 @@ public class TestEarlyTermination extend
     dir = newDirectory();
     numDocs = atLeast(150);
     final int numTerms = TestUtil.nextInt(random(), 1, numDocs / 5);
-    Set<String> randomTerms = new HashSet<String>();
+    Set<String> randomTerms = new HashSet<>();
     while (randomTerms.size() < numTerms) {
       randomTerms.add(TestUtil.randomSimpleString(random()));
     }
-    terms = new ArrayList<String>(randomTerms);
+    terms = new ArrayList<>(randomTerms);
     final long seed = random().nextLong();
     final IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(new Random(seed)));
     iwc.setMergePolicy(TestSortingMergePolicy.newSortingMergePolicy(sort));

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestSortingMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestSortingMergePolicy.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestSortingMergePolicy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/index/sorter/TestSortingMergePolicy.java Wed Mar 12 18:14:05 2014
@@ -95,11 +95,11 @@ public class TestSortingMergePolicy exte
     dir2 = newDirectory();
     final int numDocs = atLeast(150);
     final int numTerms = TestUtil.nextInt(random(), 1, numDocs / 5);
-    Set<String> randomTerms = new HashSet<String>();
+    Set<String> randomTerms = new HashSet<>();
     while (randomTerms.size() < numTerms) {
       randomTerms.add(TestUtil.randomSimpleString(random()));
     }
-    terms = new ArrayList<String>(randomTerms);
+    terms = new ArrayList<>(randomTerms);
     final long seed = random().nextLong();
     final IndexWriterConfig iwc1 = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(new Random(seed)));
     final IndexWriterConfig iwc2 = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(new Random(seed)));

Modified: lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/util/fst/TestFSTsMisc.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/util/fst/TestFSTsMisc.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/util/fst/TestFSTsMisc.java (original)
+++ lucene/dev/branches/branch_4x/lucene/misc/src/test/org/apache/lucene/util/fst/TestFSTsMisc.java Wed Mar 12 18:14:05 2014
@@ -67,7 +67,7 @@ public class TestFSTsMisc extends Lucene
       }
       for(int inputMode=0;inputMode<2;inputMode++) {
         final int numWords = random.nextInt(maxNumWords+1);
-        Set<IntsRef> termsSet = new HashSet<IntsRef>();
+        Set<IntsRef> termsSet = new HashSet<>();
         IntsRef[] terms = new IntsRef[numWords];
         while(termsSet.size() < numWords) {
           final String term = getRandomString(random);
@@ -88,7 +88,7 @@ public class TestFSTsMisc extends Lucene
         System.out.println("TEST: now test UpToTwoPositiveIntOutputs");
       }
       final UpToTwoPositiveIntOutputs outputs = UpToTwoPositiveIntOutputs.getSingleton(true);
-      final List<FSTTester.InputOutput<Object>> pairs = new ArrayList<FSTTester.InputOutput<Object>>(terms.length);
+      final List<FSTTester.InputOutput<Object>> pairs = new ArrayList<>(terms.length);
       long lastOutput = 0;
       for(int idx=0;idx<terms.length;idx++) {
         // Sometimes go backwards
@@ -102,14 +102,14 @@ public class TestFSTsMisc extends Lucene
           while(value2 < 0) {
             value2 = lastOutput + TestUtil.nextInt(random(), -100, 1000);
           }
-          List<Long> values = new ArrayList<Long>();
+          List<Long> values = new ArrayList<>();
           values.add(value);
           values.add(value2);
           output = values;
         } else {
           output = outputs.get(value);
         }
-        pairs.add(new FSTTester.InputOutput<Object>(terms[idx], output));
+        pairs.add(new FSTTester.InputOutput<>(terms[idx], output));
       }
       new FSTTester<Object>(random(), dir, inputMode, pairs, outputs, false) {
         @Override
@@ -133,13 +133,13 @@ public class TestFSTsMisc extends Lucene
         System.out.println("TEST: now test OneOrMoreOutputs");
       }
       final PositiveIntOutputs _outputs = PositiveIntOutputs.getSingleton();
-      final ListOfOutputs<Long> outputs = new ListOfOutputs<Long>(_outputs);
-      final List<FSTTester.InputOutput<Object>> pairs = new ArrayList<FSTTester.InputOutput<Object>>(terms.length);
+      final ListOfOutputs<Long> outputs = new ListOfOutputs<>(_outputs);
+      final List<FSTTester.InputOutput<Object>> pairs = new ArrayList<>(terms.length);
       long lastOutput = 0;
       for(int idx=0;idx<terms.length;idx++) {
         
         int outputCount = TestUtil.nextInt(random(), 1, 7);
-        List<Long> values = new ArrayList<Long>();
+        List<Long> values = new ArrayList<>();
         for(int i=0;i<outputCount;i++) {
           // Sometimes go backwards
           long value = lastOutput + TestUtil.nextInt(random(), -100, 1000);
@@ -157,16 +157,16 @@ public class TestFSTsMisc extends Lucene
           output = values;
         }
 
-        pairs.add(new FSTTester.InputOutput<Object>(terms[idx], output));
+        pairs.add(new FSTTester.InputOutput<>(terms[idx], output));
       }
-      new FSTTester<Object>(random(), dir, inputMode, pairs, outputs, false).doTest(false);
+      new FSTTester<>(random(), dir, inputMode, pairs, outputs, false).doTest(false);
     }
   }
 
   public void testListOfOutputs() throws Exception {
     PositiveIntOutputs _outputs = PositiveIntOutputs.getSingleton();
-    ListOfOutputs<Long> outputs = new ListOfOutputs<Long>(_outputs);
-    final Builder<Object> builder = new Builder<Object>(FST.INPUT_TYPE.BYTE1, outputs);
+    ListOfOutputs<Long> outputs = new ListOfOutputs<>(_outputs);
+    final Builder<Object> builder = new Builder<>(FST.INPUT_TYPE.BYTE1, outputs);
 
     final IntsRef scratch = new IntsRef();
     // Add the same input more than once and the outputs
@@ -194,8 +194,8 @@ public class TestFSTsMisc extends Lucene
 
   public void testListOfOutputsEmptyString() throws Exception {
     PositiveIntOutputs _outputs = PositiveIntOutputs.getSingleton();
-    ListOfOutputs<Long> outputs = new ListOfOutputs<Long>(_outputs);
-    final Builder<Object> builder = new Builder<Object>(FST.INPUT_TYPE.BYTE1, outputs);
+    ListOfOutputs<Long> outputs = new ListOfOutputs<>(_outputs);
+    final Builder<Object> builder = new Builder<>(FST.INPUT_TYPE.BYTE1, outputs);
 
     final IntsRef scratch = new IntsRef();
     builder.add(scratch, 0L);

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/BooleanFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/BooleanFilter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/BooleanFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/BooleanFilter.java Wed Mar 12 18:14:05 2014
@@ -43,7 +43,7 @@ import org.apache.lucene.util.FixedBitSe
  */
 public class BooleanFilter extends Filter implements Iterable<FilterClause> {
 
-  private final List<FilterClause> clauses = new ArrayList<FilterClause>();
+  private final List<FilterClause> clauses = new ArrayList<>();
 
   /**
    * Returns the a DocIdSetIterator representing the Boolean composition

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java Wed Mar 12 18:14:05 2014
@@ -67,7 +67,7 @@ public class CommonTermsQuery extends Qu
    * rewrite to dismax rather than boolean. Yet, this can already be subclassed
    * to do so.
    */
-  protected final List<Term> terms = new ArrayList<Term>();
+  protected final List<Term> terms = new ArrayList<>();
   protected final boolean disableCoord;
   protected final float maxTermFrequency;
   protected final Occur lowFreqOccur;

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/TermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/TermsFilter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/TermsFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/TermsFilter.java Wed Mar 12 18:14:05 2014
@@ -129,7 +129,7 @@ public final class TermsFilter extends F
     this.offsets = new int[length+1];
     int lastEndOffset = 0;
     int index = 0;
-    ArrayList<TermsAndField> termsAndFields = new ArrayList<TermsAndField>();
+    ArrayList<TermsAndField> termsAndFields = new ArrayList<>();
     TermsAndField lastTermsAndField = null;
     BytesRef previousTerm = null;
     String previousField = null;

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java Wed Mar 12 18:14:05 2014
@@ -705,7 +705,7 @@ public final class MoreLikeThis {
    * @param docNum the id of the lucene document from which to find terms
    */
   public PriorityQueue<Object[]> retrieveTerms(int docNum) throws IOException {
-    Map<String, Int> termFreqMap = new HashMap<String, Int>();
+    Map<String, Int> termFreqMap = new HashMap<>();
     for (String fieldName : fieldNames) {
       final Fields vectors = ir.getTermVectors(docNum);
       final Terms vector;
@@ -848,7 +848,7 @@ public final class MoreLikeThis {
    * @see #retrieveInterestingTerms
    */
   public PriorityQueue<Object[]> retrieveTerms(Reader r, String fieldName) throws IOException {
-    Map<String, Int> words = new HashMap<String, Int>();
+    Map<String, Int> words = new HashMap<>();
     addTermFrequencies(r, words, fieldName);
     return createQueue(words);
   }
@@ -857,7 +857,7 @@ public final class MoreLikeThis {
    * @see #retrieveInterestingTerms(java.io.Reader, String)
    */
   public String[] retrieveInterestingTerms(int docNum) throws IOException {
-    ArrayList<Object> al = new ArrayList<Object>(maxQueryTerms);
+    ArrayList<Object> al = new ArrayList<>(maxQueryTerms);
     PriorityQueue<Object[]> pq = retrieveTerms(docNum);
     Object cur;
     int lim = maxQueryTerms; // have to be careful, retrieveTerms returns all words but that's probably not useful to our caller...
@@ -881,7 +881,7 @@ public final class MoreLikeThis {
    * @see #setMaxQueryTerms
    */
   public String[] retrieveInterestingTerms(Reader r, String fieldName) throws IOException {
-    ArrayList<Object> al = new ArrayList<Object>(maxQueryTerms);
+    ArrayList<Object> al = new ArrayList<>(maxQueryTerms);
     PriorityQueue<Object[]> pq = retrieveTerms(r, fieldName);
     Object cur;
     int lim = maxQueryTerms; // have to be careful, retrieveTerms returns all words but that's probably not useful to our caller...

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/CommonTermsQueryTest.java Wed Mar 12 18:14:05 2014
@@ -287,8 +287,8 @@ public class CommonTermsQueryTest extend
       assertEquals("0", r.document(search.scoreDocs[0].doc).get("id"));
       // doc 2 and 3 only get a score from low freq terms
       assertEquals(
-          new HashSet<String>(Arrays.asList("2", "3")),
-          new HashSet<String>(Arrays.asList(
+          new HashSet<>(Arrays.asList("2", "3")),
+          new HashSet<>(Arrays.asList(
               r.document(search.scoreDocs[1].doc).get("id"),
               r.document(search.scoreDocs[2].doc).get("id"))));
     }
@@ -318,8 +318,8 @@ public class CommonTermsQueryTest extend
       TopDocs search = s.search(query, 10);
       assertEquals(search.totalHits, 2);
       assertEquals(
-          new HashSet<String>(Arrays.asList("0", "2")),
-          new HashSet<String>(Arrays.asList(
+          new HashSet<>(Arrays.asList("0", "2")),
+          new HashSet<>(Arrays.asList(
               r.document(search.scoreDocs[0].doc).get("id"),
               r.document(search.scoreDocs[1].doc).get("id"))));
     }
@@ -477,7 +477,7 @@ public class CommonTermsQueryTest extend
       
       TopDocs verifySearch = searcher.search(verifyQuery, reader.maxDoc());
       assertEquals(verifySearch.totalHits, cqSearch.totalHits);
-      Set<Integer> hits = new HashSet<Integer>();
+      Set<Integer> hits = new HashSet<>();
       for (ScoreDoc doc : verifySearch.scoreDocs) {
         hits.add(doc.doc);
       }
@@ -508,7 +508,7 @@ public class CommonTermsQueryTest extend
   }
   
   private static List<TermAndFreq> queueToList(PriorityQueue<TermAndFreq> queue) {
-    List<TermAndFreq> terms = new ArrayList<CommonTermsQueryTest.TermAndFreq>();
+    List<TermAndFreq> terms = new ArrayList<>();
     while (queue.size() > 0) {
       terms.add(queue.pop());
     }

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermFilterTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermFilterTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermFilterTest.java Wed Mar 12 18:14:05 2014
@@ -45,7 +45,7 @@ public class TermFilterTest extends Luce
 
   public void testCachability() throws Exception {
     TermFilter a = termFilter("field1", "a");
-    HashSet<Filter> cachedFilters = new HashSet<Filter>();
+    HashSet<Filter> cachedFilters = new HashSet<>();
     cachedFilters.add(a);
     assertTrue("Must be cached", cachedFilters.contains(termFilter("field1", "a")));
     assertFalse("Must not be cached", cachedFilters.contains(termFilter("field1", "b")));
@@ -84,7 +84,7 @@ public class TermFilterTest extends Luce
     Directory dir = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), dir);
     int num = atLeast(100);
-    List<Term> terms = new ArrayList<Term>();
+    List<Term> terms = new ArrayList<>();
     for (int i = 0; i < num; i++) {
       String field = "field" + i;
       String string = TestUtil.randomRealisticUnicodeString(random());

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java Wed Mar 12 18:14:05 2014
@@ -55,7 +55,7 @@ public class TermsFilterTest extends Luc
 
   public void testCachability() throws Exception {
     TermsFilter a = termsFilter(random().nextBoolean(), new Term("field1", "a"), new Term("field1", "b"));
-    HashSet<Filter> cachedFilters = new HashSet<Filter>();
+    HashSet<Filter> cachedFilters = new HashSet<>();
     cachedFilters.add(a);
     TermsFilter b = termsFilter(random().nextBoolean(), new Term("field1", "b"), new Term("field1", "a"));
     assertTrue("Must be cached", cachedFilters.contains(b));
@@ -79,7 +79,7 @@ public class TermsFilterTest extends Luc
     AtomicReaderContext context = (AtomicReaderContext) reader.getContext();
     w.close();
 
-    List<Term> terms = new ArrayList<Term>();
+    List<Term> terms = new ArrayList<>();
     terms.add(new Term(fieldName, "19"));
     FixedBitSet bits = (FixedBitSet) termsFilter(random().nextBoolean(), terms).getDocIdSet(context, context.reader().getLiveDocs());
     assertNull("Must match nothing", bits);
@@ -142,7 +142,7 @@ public class TermsFilterTest extends Luc
     RandomIndexWriter w = new RandomIndexWriter(random(), dir);
     int num = atLeast(3);
     int skip = random().nextInt(num);
-    List<Term> terms = new ArrayList<Term>();
+    List<Term> terms = new ArrayList<>();
     for (int i = 0; i < num; i++) {
       terms.add(new Term("field" + i, "content1"));
       Document doc = new Document();
@@ -173,7 +173,7 @@ public class TermsFilterTest extends Luc
     Directory dir = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), dir);
     int num = atLeast(10);
-    Set<Term> terms = new HashSet<Term>();
+    Set<Term> terms = new HashSet<>();
     for (int i = 0; i < num; i++) {
       String field = "field" + random().nextInt(100);
       terms.add(new Term(field, "content1"));
@@ -197,7 +197,7 @@ public class TermsFilterTest extends Luc
     w.close();
     assertEquals(1, reader.leaves().size());
     AtomicReaderContext context = reader.leaves().get(0);
-    TermsFilter tf = new TermsFilter(new ArrayList<Term>(terms));
+    TermsFilter tf = new TermsFilter(new ArrayList<>(terms));
 
     FixedBitSet bits = (FixedBitSet) tf.getDocIdSet(context, context.reader().getLiveDocs());
     assertEquals(context.reader().numDocs(), bits.cardinality());  
@@ -210,7 +210,7 @@ public class TermsFilterTest extends Luc
     RandomIndexWriter w = new RandomIndexWriter(random(), dir);
     int num = atLeast(100);
     final boolean singleField = random().nextBoolean();
-    List<Term> terms = new ArrayList<Term>();
+    List<Term> terms = new ArrayList<>();
     for (int i = 0; i < num; i++) {
       String field = "field" + (singleField ? "1" : random().nextInt(100));
       String string = TestUtil.randomRealisticUnicodeString(random());
@@ -255,10 +255,10 @@ public class TermsFilterTest extends Luc
 
   private TermsFilter termsFilter(boolean singleField, Collection<Term> termList) {
     if (!singleField) {
-      return new TermsFilter(new ArrayList<Term>(termList));
+      return new TermsFilter(new ArrayList<>(termList));
     }
     final TermsFilter filter;
-    List<BytesRef> bytes = new ArrayList<BytesRef>();
+    List<BytesRef> bytes = new ArrayList<>();
     String field = null;
     for (Term term : termList) {
         bytes.add(term.bytes());
@@ -275,8 +275,8 @@ public class TermsFilterTest extends Luc
   public void testHashCodeAndEquals() {
     int num = atLeast(100);
     final boolean singleField = random().nextBoolean();
-    List<Term> terms = new ArrayList<Term>();
-    Set<Term> uniqueTerms = new HashSet<Term>();
+    List<Term> terms = new ArrayList<>();
+    Set<Term> uniqueTerms = new HashSet<>();
     for (int i = 0; i < num; i++) {
       String field = "field" + (singleField ? "1" : random().nextInt(100));
       String string = TestUtil.randomRealisticUnicodeString(random());
@@ -288,7 +288,7 @@ public class TermsFilterTest extends Luc
       assertEquals(right, left);
       assertEquals(right.hashCode(), left.hashCode());
       if (uniqueTerms.size() > 1) {
-        List<Term> asList = new ArrayList<Term>(uniqueTerms);
+        List<Term> asList = new ArrayList<>(uniqueTerms);
         asList.remove(0);
         TermsFilter notEqual = termsFilter(singleField ? random().nextBoolean() : false, asList);
         assertFalse(left.equals(notEqual));

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java Wed Mar 12 18:14:05 2014
@@ -363,7 +363,7 @@ public class TestCustomScoreQuery extend
   // since custom scoring modifies the order of docs, map results 
   // by doc ids so that we can later compare/verify them 
   private Map<Integer,Float> topDocsToMap(TopDocs td) {
-    Map<Integer,Float> h = new HashMap<Integer,Float>();
+    Map<Integer,Float> h = new HashMap<>();
     for (int i=0; i<td.totalHits; i++) {
       h.put(td.scoreDocs[i].doc, td.scoreDocs[i].score);
     }

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java Wed Mar 12 18:14:05 2014
@@ -108,7 +108,7 @@ public class TestMoreLikeThis extends Lu
   }
   
   private Map<String,Float> getOriginalValues() throws IOException {
-    Map<String,Float> originalValues = new HashMap<String,Float>();
+    Map<String,Float> originalValues = new HashMap<>();
     MoreLikeThis mlt = new MoreLikeThis(reader);
     mlt.setAnalyzer(new MockAnalyzer(random(), MockTokenizer.WHITESPACE, false));
     mlt.setMinDocFreq(1);

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java Wed Mar 12 18:14:05 2014
@@ -98,7 +98,7 @@ public class MultiFieldQueryParser exten
   @Override
   protected Query getFieldQuery(String field, String queryText, int slop) throws ParseException {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         Query q = super.getFieldQuery(fields[i], queryText, true);
         if (q != null) {
@@ -135,7 +135,7 @@ public class MultiFieldQueryParser exten
   @Override
   protected Query getFieldQuery(String field, String queryText, boolean quoted) throws ParseException {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         Query q = super.getFieldQuery(fields[i], queryText, quoted);
         if (q != null) {
@@ -163,7 +163,7 @@ public class MultiFieldQueryParser exten
   protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException
   {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         clauses.add(new BooleanClause(getFuzzyQuery(fields[i], termStr, minSimilarity),
             BooleanClause.Occur.SHOULD));
@@ -177,7 +177,7 @@ public class MultiFieldQueryParser exten
   protected Query getPrefixQuery(String field, String termStr) throws ParseException
   {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         clauses.add(new BooleanClause(getPrefixQuery(fields[i], termStr),
             BooleanClause.Occur.SHOULD));
@@ -190,7 +190,7 @@ public class MultiFieldQueryParser exten
   @Override
   protected Query getWildcardQuery(String field, String termStr) throws ParseException {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         clauses.add(new BooleanClause(getWildcardQuery(fields[i], termStr),
             BooleanClause.Occur.SHOULD));
@@ -204,7 +204,7 @@ public class MultiFieldQueryParser exten
   @Override
   protected Query getRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) throws ParseException {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         clauses.add(new BooleanClause(getRangeQuery(fields[i], part1, part2, startInclusive, endInclusive),
             BooleanClause.Occur.SHOULD));
@@ -220,7 +220,7 @@ public class MultiFieldQueryParser exten
   protected Query getRegexpQuery(String field, String termStr)
       throws ParseException {
     if (field == null) {
-      List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+      List<BooleanClause> clauses = new ArrayList<>();
       for (int i = 0; i < fields.length; i++) {
         clauses.add(new BooleanClause(getRegexpQuery(fields[i], termStr),
             BooleanClause.Occur.SHOULD));

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java Wed Mar 12 18:14:05 2014
@@ -174,7 +174,7 @@ public class QueryParser extends QueryPa
   }
 
   final public Query Query(String field) throws ParseException {
-  List<BooleanClause> clauses = new ArrayList<BooleanClause>();
+  List<BooleanClause> clauses = new ArrayList<>();
   Query q, firstQuery=null;
   int conj, mods;
     mods = Modifiers();
@@ -640,7 +640,7 @@ public class QueryParser extends QueryPa
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
+  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<>();
   private int[] jj_expentry;
   private int jj_kind = -1;
   private int[] jj_lasttokens = new int[100];

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java Wed Mar 12 18:14:05 2014
@@ -356,7 +356,7 @@ public abstract class QueryParserBase ex
 
     if (fieldToDateResolution == null) {
       // lazily initialize HashMap
-      fieldToDateResolution = new HashMap<String,DateTools.Resolution>();
+      fieldToDateResolution = new HashMap<>();
     }
 
     fieldToDateResolution.put(fieldName, dateResolution);

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.java Wed Mar 12 18:14:05 2014
@@ -104,7 +104,7 @@ public class ComplexPhraseQueryParser ex
 
     // First pass - parse the top-level query recording any PhraseQuerys
     // which will need to be resolved
-    complexPhrases = new ArrayList<ComplexPhraseQuery>();
+    complexPhrases = new ArrayList<>();
     Query q = super.parse(query);
 
     // Perform second pass, using this QueryParser to parse any nested
@@ -254,7 +254,7 @@ public class ComplexPhraseQueryParser ex
         }
 
         if (qc instanceof BooleanQuery) {
-          ArrayList<SpanQuery> sc = new ArrayList<SpanQuery>();
+          ArrayList<SpanQuery> sc = new ArrayList<>();
           addComplexPhraseClause(sc, (BooleanQuery) qc);
           if (sc.size() > 0) {
             allSpanClauses[i] = sc.get(0);
@@ -285,7 +285,7 @@ public class ComplexPhraseQueryParser ex
       // Complex case - we have mixed positives and negatives in the
       // sequence.
       // Need to return a SpanNotQuery
-      ArrayList<SpanQuery> positiveClauses = new ArrayList<SpanQuery>();
+      ArrayList<SpanQuery> positiveClauses = new ArrayList<>();
       for (int j = 0; j < allSpanClauses.length; j++) {
         if (!bclauses[j].getOccur().equals(BooleanClause.Occur.MUST_NOT)) {
           positiveClauses.add(allSpanClauses[j]);
@@ -312,8 +312,8 @@ public class ComplexPhraseQueryParser ex
     }
 
     private void addComplexPhraseClause(List<SpanQuery> spanClauses, BooleanQuery qc) {
-      ArrayList<SpanQuery> ors = new ArrayList<SpanQuery>();
-      ArrayList<SpanQuery> nots = new ArrayList<SpanQuery>();
+      ArrayList<SpanQuery> ors = new ArrayList<>();
+      ArrayList<SpanQuery> nots = new ArrayList<>();
       BooleanClause[] bclauses = qc.getClauses();
 
       // For all clauses e.g. one* two~

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/ext/Extensions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/ext/Extensions.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/ext/Extensions.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/ext/Extensions.java Wed Mar 12 18:14:05 2014
@@ -42,7 +42,7 @@ import java.util.Map;
  * @see ParserExtension
  */
 public class Extensions {
-  private final Map<String,ParserExtension> extensions = new HashMap<String,ParserExtension>();
+  private final Map<String,ParserExtension> extensions = new HashMap<>();
   private final char extensionFieldDelimiter;
   /**
    * The default extension field delimiter character. This constant is set to
@@ -122,11 +122,11 @@ public class Extensions {
       String field) {
     int indexOf = field.indexOf(this.extensionFieldDelimiter);
     if (indexOf < 0)
-      return new Pair<String,String>(field, null);
+      return new Pair<>(field, null);
     final String indexField = indexOf == 0 ? defaultField : field.substring(0,
         indexOf);
     final String extensionKey = field.substring(indexOf + 1);
-    return new Pair<String,String>(indexField, extensionKey);
+    return new Pair<>(indexField, extensionKey);
 
   }
 

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/QueryTreeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/QueryTreeBuilder.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/QueryTreeBuilder.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/QueryTreeBuilder.java Wed Mar 12 18:14:05 2014
@@ -79,7 +79,7 @@ public class QueryTreeBuilder implements
   public void setBuilder(CharSequence fieldName, QueryBuilder builder) {
 
     if (this.fieldNameBuilders == null) {
-      this.fieldNameBuilders = new HashMap<String, QueryBuilder>();
+      this.fieldNameBuilders = new HashMap<>();
     }
 
     this.fieldNameBuilders.put(fieldName.toString(), builder);
@@ -97,7 +97,7 @@ public class QueryTreeBuilder implements
       QueryBuilder builder) {
 
     if (this.queryNodeBuilders == null) {
-      this.queryNodeBuilders = new HashMap<Class<? extends QueryNode>, QueryBuilder>();
+      this.queryNodeBuilders = new HashMap<>();
     }
 
     this.queryNodeBuilders.put(queryNodeClass, builder);

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java Wed Mar 12 18:14:05 2014
@@ -33,7 +33,7 @@ import java.util.HashMap;
  */
 public abstract class AbstractQueryConfig {
   
-  final private HashMap<ConfigurationKey<?>, Object> configMap = new HashMap<ConfigurationKey<?>, Object>();
+  final private HashMap<ConfigurationKey<?>, Object> configMap = new HashMap<>();
   
   AbstractQueryConfig() {
     // although this class is public, it can only be constructed from package

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/ConfigurationKey.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/ConfigurationKey.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/ConfigurationKey.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/ConfigurationKey.java Wed Mar 12 18:14:05 2014
@@ -36,7 +36,7 @@ final public class ConfigurationKey<T> {
    * @return a new instance
    */
   public static <T> ConfigurationKey<T> newInstance() {
-    return new ConfigurationKey<T>();
+    return new ConfigurationKey<>();
   }
   
 }

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/QueryConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/QueryConfigHandler.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/QueryConfigHandler.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/QueryConfigHandler.java Wed Mar 12 18:14:05 2014
@@ -40,7 +40,7 @@ import org.apache.lucene.queryparser.fle
  */
 public abstract class QueryConfigHandler extends AbstractQueryConfig {
   
-  final private LinkedList<FieldConfigListener> listeners = new LinkedList<FieldConfigListener>();
+  final private LinkedList<FieldConfigListener> listeners = new LinkedList<>();
 
   /**
    * Returns an implementation of

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/GroupQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/GroupQueryNode.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/GroupQueryNode.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/GroupQueryNode.java Wed Mar 12 18:14:05 2014
@@ -73,7 +73,7 @@ public class GroupQueryNode extends Quer
   }
 
   public void setChild(QueryNode child) {
-    List<QueryNode> list = new ArrayList<QueryNode>();
+    List<QueryNode> list = new ArrayList<>();
     list.add(child);
     this.set(list);
   }

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java Wed Mar 12 18:14:05 2014
@@ -151,7 +151,7 @@ public class ModifierQueryNode extends Q
   }
 
   public void setChild(QueryNode child) {
-    List<QueryNode> list = new ArrayList<QueryNode>();
+    List<QueryNode> list = new ArrayList<>();
     list.add(child);
     this.set(list);
   }

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java Wed Mar 12 18:14:05 2014
@@ -162,7 +162,7 @@ public class PathQueryNode extends Query
    * @return a List QueryText element from position startIndex
    */
   public List<QueryText> getPathElements(int startIndex) {
-    List<PathQueryNode.QueryText> rValues = new ArrayList<PathQueryNode.QueryText>();
+    List<PathQueryNode.QueryText> rValues = new ArrayList<>();
     for (int i = startIndex; i < this.values.size(); i++) {
       try {
         rValues.add(this.values.get(i).clone());
@@ -209,7 +209,7 @@ public class PathQueryNode extends Query
 
     // copy children
     if (this.values != null) {
-      List<QueryText> localValues = new ArrayList<QueryText>();
+      List<QueryText> localValues = new ArrayList<>();
       for (QueryText value : this.values) {
         localValues.add(value.clone());
       }

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java Wed Mar 12 18:14:05 2014
@@ -41,14 +41,14 @@ public abstract class QueryNodeImpl impl
 
   private boolean isLeaf = true;
 
-  private Hashtable<String, Object> tags = new Hashtable<String, Object>();
+  private Hashtable<String, Object> tags = new Hashtable<>();
 
   private List<QueryNode> clauses = null;
 
   protected void allocate() {
 
     if (this.clauses == null) {
-      this.clauses = new ArrayList<QueryNode>();
+      this.clauses = new ArrayList<>();
 
     } else {
       this.clauses.clear();
@@ -106,7 +106,7 @@ public abstract class QueryNodeImpl impl
       child.removeFromParent();
     }
     
-    ArrayList<QueryNode> existingChildren = new ArrayList<QueryNode>(getChildren());
+    ArrayList<QueryNode> existingChildren = new ArrayList<>(getChildren());
     for (QueryNode existingChild : existingChildren) {
       existingChild.removeFromParent();
     }
@@ -124,11 +124,11 @@ public abstract class QueryNodeImpl impl
     clone.isLeaf = this.isLeaf;
 
     // Reset all tags
-    clone.tags = new Hashtable<String, Object>();
+    clone.tags = new Hashtable<>();
 
     // copy children
     if (this.clauses != null) {
-      List<QueryNode> localClauses = new ArrayList<QueryNode>();
+      List<QueryNode> localClauses = new ArrayList<>();
       for (QueryNode clause : this.clauses) {
         localClauses.add(clause.cloneTree());
       }
@@ -156,7 +156,7 @@ public abstract class QueryNodeImpl impl
     if (isLeaf() || this.clauses == null) {
       return null;
     }
-    return new ArrayList<QueryNode>(this.clauses);
+    return new ArrayList<>(this.clauses);
   }
 
   @Override

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorImpl.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorImpl.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorImpl.java Wed Mar 12 18:14:05 2014
@@ -73,7 +73,7 @@ import org.apache.lucene.queryparser.fle
  */
 public abstract class QueryNodeProcessorImpl implements QueryNodeProcessor {
 
-  private ArrayList<ChildrenList> childrenListPool = new ArrayList<ChildrenList>();
+  private ArrayList<ChildrenList> childrenListPool = new ArrayList<>();
 
   private QueryConfigHandler queryConfig;
 

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorPipeline.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorPipeline.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorPipeline.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorPipeline.java Wed Mar 12 18:14:05 2014
@@ -40,7 +40,7 @@ import org.apache.lucene.queryparser.fle
 public class QueryNodeProcessorPipeline implements QueryNodeProcessor,
     List<QueryNodeProcessor> {
 
-  private LinkedList<QueryNodeProcessor> processors = new LinkedList<QueryNodeProcessor>();
+  private LinkedList<QueryNodeProcessor> processors = new LinkedList<>();
 
   private QueryConfigHandler queryConfig;
 

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java Wed Mar 12 18:14:05 2014
@@ -66,7 +66,7 @@ public final class QueryNodeOperation {
       QueryNode result = null;
       switch (op) {
       case NONE:
-        List<QueryNode> children = new ArrayList<QueryNode>();
+        List<QueryNode> children = new ArrayList<>();
         children.add(q1.cloneTree());
         children.add(q2.cloneTree());
         result = new AndQueryNode(children);

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/NLS.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/NLS.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/NLS.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/NLS.java Wed Mar 12 18:14:05 2014
@@ -46,7 +46,7 @@ import java.util.ResourceBundle;
 public class NLS {
 
   private static Map<String, Class<? extends NLS>> bundles = 
-    new HashMap<String, Class<? extends NLS>>(0);
+    new HashMap<>(0);
 
   protected NLS() {
     // Do not instantiate
@@ -129,7 +129,7 @@ public class NLS {
 
     // build a map of field names to Field objects
     final int len = fieldArray.length;
-    Map<String, Field> fields = new HashMap<String, Field>(len * 2);
+    Map<String, Field> fields = new HashMap<>(len * 2);
     for (int i = 0; i < len; i++) {
       fields.put(fieldArray[i].getName(), fieldArray[i]);
       loadfieldValue(fieldArray[i], isFieldAccessible, clazz);

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/processors/BooleanModifiersQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/processors/BooleanModifiersQueryNodeProcessor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/processors/BooleanModifiersQueryNodeProcessor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/processors/BooleanModifiersQueryNodeProcessor.java Wed Mar 12 18:14:05 2014
@@ -46,7 +46,7 @@ import org.apache.lucene.queryparser.fle
  */
 public class BooleanModifiersQueryNodeProcessor extends QueryNodeProcessorImpl {
 
-  private ArrayList<QueryNode> childrenBuffer = new ArrayList<QueryNode>();
+  private ArrayList<QueryNode> childrenBuffer = new ArrayList<>();
 
   private Boolean usingAnd = false;
 

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/MultiPhraseQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/MultiPhraseQueryNodeBuilder.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/MultiPhraseQueryNodeBuilder.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/MultiPhraseQueryNodeBuilder.java Wed Mar 12 18:14:05 2014
@@ -49,7 +49,7 @@ public class MultiPhraseQueryNodeBuilder
     List<QueryNode> children = phraseNode.getChildren();
 
     if (children != null) {
-      TreeMap<Integer, List<Term>> positionTermMap = new TreeMap<Integer, List<Term>>();
+      TreeMap<Integer, List<Term>> positionTermMap = new TreeMap<>();
 
       for (QueryNode child : children) {
         FieldQueryNode termNode = (FieldQueryNode) child;
@@ -59,7 +59,7 @@ public class MultiPhraseQueryNodeBuilder
             .getPositionIncrement());
 
         if (termList == null) {
-          termList = new LinkedList<Term>();
+          termList = new LinkedList<>();
           positionTermMap.put(termNode.getPositionIncrement(), termList);
 
         }

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/AbstractRangeQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/AbstractRangeQueryNode.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/AbstractRangeQueryNode.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/AbstractRangeQueryNode.java Wed Mar 12 18:14:05 2014
@@ -163,7 +163,7 @@ public class AbstractRangeQueryNode<T ex
       this.lowerInclusive = lowerInclusive;
       this.upperInclusive = upperInclusive;
       
-      ArrayList<QueryNode> children = new ArrayList<QueryNode>(2);
+      ArrayList<QueryNode> children = new ArrayList<>(2);
       children.add(lower);
       children.add(upper);
       

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java Wed Mar 12 18:14:05 2014
@@ -185,7 +185,7 @@ public class StandardSyntaxParser implem
       }
       c = DisjQuery(field);
        if (clauses == null) {
-           clauses = new Vector<QueryNode>();
+           clauses = new Vector<>();
            clauses.addElement(first);
        }
        clauses.addElement(c);
@@ -215,7 +215,7 @@ public class StandardSyntaxParser implem
       jj_consume_token(OR);
       c = ConjQuery(field);
      if (clauses == null) {
-         clauses = new Vector<QueryNode>();
+         clauses = new Vector<>();
          clauses.addElement(first);
      }
      clauses.addElement(c);
@@ -245,7 +245,7 @@ public class StandardSyntaxParser implem
       jj_consume_token(AND);
       c = ModClause(field);
      if (clauses == null) {
-         clauses = new Vector<QueryNode>();
+         clauses = new Vector<>();
          clauses.addElement(first);
      }
      clauses.addElement(c);
@@ -986,7 +986,7 @@ public class StandardSyntaxParser implem
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
+  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<>();
   private int[] jj_expentry;
   private int jj_kind = -1;
   private int[] jj_lasttokens = new int[100];

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/AnalyzerQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/AnalyzerQueryNodeProcessor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/AnalyzerQueryNodeProcessor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/AnalyzerQueryNodeProcessor.java Wed Mar 12 18:14:05 2014
@@ -202,7 +202,7 @@ public class AnalyzerQueryNodeProcessor 
           
           if (positionCount == 1) { 
             // simple case: only one position, with synonyms
-            LinkedList<QueryNode> children = new LinkedList<QueryNode>();
+            LinkedList<QueryNode> children = new LinkedList<>();
             
             for (int i = 0; i < numTokens; i++) {
               String term = null;
@@ -267,7 +267,7 @@ public class AnalyzerQueryNodeProcessor 
           // phrase query:
           MultiPhraseQueryNode mpq = new MultiPhraseQueryNode();
 
-          List<FieldQueryNode> multiTerms = new ArrayList<FieldQueryNode>();
+          List<FieldQueryNode> multiTerms = new ArrayList<>();
           int position = -1;
           int i = 0;
           int termGroupCount = 0;

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/BooleanQuery2ModifierNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/BooleanQuery2ModifierNodeProcessor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/BooleanQuery2ModifierNodeProcessor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/BooleanQuery2ModifierNodeProcessor.java Wed Mar 12 18:14:05 2014
@@ -68,7 +68,7 @@ public class BooleanQuery2ModifierNodePr
   
   QueryConfigHandler queryConfigHandler;
   
-  private final ArrayList<QueryNode> childrenBuffer = new ArrayList<QueryNode>();
+  private final ArrayList<QueryNode> childrenBuffer = new ArrayList<>();
   
   private Boolean usingAnd = false;
   

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/GroupQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/GroupQueryNodeProcessor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/GroupQueryNodeProcessor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/GroupQueryNodeProcessor.java Wed Mar 12 18:14:05 2014
@@ -80,7 +80,7 @@ public class GroupQueryNodeProcessor imp
       queryTree = ((GroupQueryNode) queryTree).getChild();
     }
 
-    this.queryNodeList = new ArrayList<QueryNode>();
+    this.queryNodeList = new ArrayList<>();
     this.latestNodeVerified = false;
     readTree(queryTree);
 

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/MultiFieldQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/MultiFieldQueryNodeProcessor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/MultiFieldQueryNodeProcessor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/MultiFieldQueryNodeProcessor.java Wed Mar 12 18:14:05 2014
@@ -93,7 +93,7 @@ public class MultiFieldQueryNodeProcesso
             return fieldNode;
 
           } else {
-            LinkedList<QueryNode> children = new LinkedList<QueryNode>();
+            LinkedList<QueryNode> children = new LinkedList<>();
             children.add(fieldNode);
 
             for (int i = 1; i < fields.length; i++) {

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/RemoveEmptyNonLeafQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/RemoveEmptyNonLeafQueryNodeProcessor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/RemoveEmptyNonLeafQueryNodeProcessor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/RemoveEmptyNonLeafQueryNodeProcessor.java Wed Mar 12 18:14:05 2014
@@ -42,7 +42,7 @@ import org.apache.lucene.queryparser.fle
 public class RemoveEmptyNonLeafQueryNodeProcessor extends
     QueryNodeProcessorImpl {
 
-  private LinkedList<QueryNode> childrenBuffer = new LinkedList<QueryNode>();
+  private LinkedList<QueryNode> childrenBuffer = new LinkedList<>();
 
   public RemoveEmptyNonLeafQueryNodeProcessor() {
     // empty constructor

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java Wed Mar 12 18:14:05 2014
@@ -185,7 +185,7 @@ public class QueryParser implements Quer
           fieldName = jj_consume_token(TERM);
       jj_consume_token(COLON);
       if (fieldNames == null) {
-        fieldNames = new ArrayList<String>();
+        fieldNames = new ArrayList<>();
       }
       fieldNames.add(fieldName.image);
     }
@@ -211,7 +211,7 @@ public class QueryParser implements Quer
       oprt = jj_consume_token(OR);
                   /* keep only last used operator */
       if (queries == null) {
-        queries = new ArrayList<SrndQuery>();
+        queries = new ArrayList<>();
         queries.add(q);
       }
       q = AndQuery();
@@ -239,7 +239,7 @@ public class QueryParser implements Quer
       oprt = jj_consume_token(AND);
                    /* keep only last used operator */
       if (queries == null) {
-        queries = new ArrayList<SrndQuery>();
+        queries = new ArrayList<>();
         queries.add(q);
       }
       q = NotQuery();
@@ -267,7 +267,7 @@ public class QueryParser implements Quer
       oprt = jj_consume_token(NOT);
                     /* keep only last used operator */
       if (queries == null) {
-        queries = new ArrayList<SrndQuery>();
+        queries = new ArrayList<>();
         queries.add(q);
       }
       q = NQuery();
@@ -293,7 +293,7 @@ public class QueryParser implements Quer
         break label_5;
       }
       dt = jj_consume_token(N);
-      queries = new ArrayList<SrndQuery>();
+      queries = new ArrayList<>();
       queries.add(q); /* left associative */
 
       q = WQuery();
@@ -320,7 +320,7 @@ public class QueryParser implements Quer
         break label_6;
       }
       wt = jj_consume_token(W);
-      queries = new ArrayList<SrndQuery>();
+      queries = new ArrayList<>();
       queries.add(q); /* left associative */
 
       q = PrimaryQuery();
@@ -401,7 +401,7 @@ public class QueryParser implements Quer
 
   final public List<SrndQuery> FieldsQueryList() throws ParseException {
   SrndQuery q;
-  ArrayList<SrndQuery> queries = new ArrayList<SrndQuery>();
+  ArrayList<SrndQuery> queries = new ArrayList<>();
     jj_consume_token(LPAREN);
     q = FieldsQuery();
                      queries.add(q);
@@ -644,7 +644,7 @@ public class QueryParser implements Quer
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
+  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<>();
   private int[] jj_expentry;
   private int jj_kind = -1;
   private int[] jj_lasttokens = new int[100];

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/ComposedQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/ComposedQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/ComposedQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/ComposedQuery.java Wed Mar 12 18:14:05 2014
@@ -51,7 +51,7 @@ public abstract class ComposedQuery exte
   public boolean isOperatorInfix() { return operatorInfix; } /* else prefix operator */
   
   public List<Query> makeLuceneSubQueriesField(String fn, BasicQueryFactory qf) {
-    List<Query> luceneSubQueries = new ArrayList<Query>();
+    List<Query> luceneSubQueries = new ArrayList<>();
     Iterator<SrndQuery> sqi = getSubQueriesIterator();
     while (sqi.hasNext()) {
       luceneSubQueries.add( (sqi.next()).makeLuceneQueryField(fn, qf));

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java Wed Mar 12 18:14:05 2014
@@ -39,7 +39,7 @@ public class FieldsQuery extends SrndQue
   
   public FieldsQuery(SrndQuery q, String fieldName, char fieldOp) {
     this.q = q;
-    fieldNames = new ArrayList<String>();
+    fieldNames = new ArrayList<>();
     fieldNames.add(fieldName);
     this.fieldOp = fieldOp;
   }
@@ -53,7 +53,7 @@ public class FieldsQuery extends SrndQue
     if (fieldNames.size() == 1) { /* single field name: no new queries needed */
       return q.makeLuceneQueryFieldNoBoost(fieldNames.get(0), qf);
     } else { /* OR query over the fields */
-      List<SrndQuery> queries = new ArrayList<SrndQuery>();
+      List<SrndQuery> queries = new ArrayList<>();
       Iterator<String> fni = getFieldNames().listIterator();
       SrndQuery qc;
       while (fni.hasNext()) {

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTermRewriteQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTermRewriteQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTermRewriteQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTermRewriteQuery.java Wed Mar 12 18:14:05 2014
@@ -35,7 +35,7 @@ class SimpleTermRewriteQuery extends Rew
 
   @Override
   public Query rewrite(IndexReader reader) throws IOException {
-    final List<Query> luceneSubQueries = new ArrayList<Query>();
+    final List<Query> luceneSubQueries = new ArrayList<>();
     srndQuery.visitMatchingTerms(reader, fieldName,
     new SimpleTerm.MatchingTermVisitor() {
       @Override

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SpanNearClauseFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SpanNearClauseFactory.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SpanNearClauseFactory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SpanNearClauseFactory.java Wed Mar 12 18:14:05 2014
@@ -71,7 +71,7 @@ public class SpanNearClauseFactory { // 
   public SpanNearClauseFactory(IndexReader reader, String fieldName, BasicQueryFactory qf) {
     this.reader = reader;
     this.fieldName = fieldName;
-    this.weightBySpanQuery = new HashMap<SpanQuery, Float>(); 
+    this.weightBySpanQuery = new HashMap<>();
     this.qf = qf;
   }
   private IndexReader reader;



Mime
View raw message