You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2014/03/12 19:14:27 UTC

svn commit: r1576837 [9/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/com...

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java Wed Mar 12 18:14:05 2014
@@ -234,7 +234,7 @@ public class TestPerSegmentDeletes exten
   }
 
   public static int[] toArray(DocsEnum docsEnum) throws IOException {
-    List<Integer> docs = new ArrayList<Integer>();
+    List<Integer> docs = new ArrayList<>();
     while (docsEnum.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
       int docID = docsEnum.docID();
       docs.add(docID);

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java Wed Mar 12 18:14:05 2014
@@ -220,7 +220,7 @@ public class TestPostingsOffsets extends
 
   public void testRandom() throws Exception {
     // token -> docID -> tokens
-    final Map<String,Map<Integer,List<Token>>> actualTokens = new HashMap<String,Map<Integer,List<Token>>>();
+    final Map<String,Map<Integer,List<Token>>> actualTokens = new HashMap<>();
 
     Directory dir = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), dir, iwc);
@@ -242,7 +242,7 @@ public class TestPostingsOffsets extends
     for(int docCount=0;docCount<numDocs;docCount++) {
       Document doc = new Document();
       doc.add(new IntField("id", docCount, Field.Store.NO));
-      List<Token> tokens = new ArrayList<Token>();
+      List<Token> tokens = new ArrayList<>();
       final int numTokens = atLeast(100);
       //final int numTokens = atLeast(20);
       int pos = -1;

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPrefixCodedTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPrefixCodedTerms.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPrefixCodedTerms.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPrefixCodedTerms.java Wed Mar 12 18:14:05 2014
@@ -46,7 +46,7 @@ public class TestPrefixCodedTerms extend
   }
   
   public void testRandom() {
-    Set<Term> terms = new TreeSet<Term>();
+    Set<Term> terms = new TreeSet<>();
     int nterms = atLeast(10000);
     for (int i = 0; i < nterms; i++) {
       Term term = new Term(TestUtil.randomUnicodeString(random(), 2), TestUtil.randomUnicodeString(random()));
@@ -79,7 +79,7 @@ public class TestPrefixCodedTerms extend
     b2.add(t2);
     PrefixCodedTerms pb2 = b2.finish();
     
-    Iterator<Term> merged = new MergedIterator<Term>(pb1.iterator(), pb2.iterator());
+    Iterator<Term> merged = new MergedIterator<>(pb1.iterator(), pb2.iterator());
     assertTrue(merged.hasNext());
     assertEquals(t1, merged.next());
     assertTrue(merged.hasNext());
@@ -89,10 +89,10 @@ public class TestPrefixCodedTerms extend
   @SuppressWarnings({"unchecked","rawtypes"})
   public void testMergeRandom() {
     PrefixCodedTerms pb[] = new PrefixCodedTerms[TestUtil.nextInt(random(), 2, 10)];
-    Set<Term> superSet = new TreeSet<Term>();
+    Set<Term> superSet = new TreeSet<>();
     
     for (int i = 0; i < pb.length; i++) {
-      Set<Term> terms = new TreeSet<Term>();
+      Set<Term> terms = new TreeSet<>();
       int nterms = TestUtil.nextInt(random(), 0, 10000);
       for (int j = 0; j < nterms; j++) {
         Term term = new Term(TestUtil.randomUnicodeString(random(), 2), TestUtil.randomUnicodeString(random(), 4));
@@ -107,13 +107,13 @@ public class TestPrefixCodedTerms extend
       pb[i] = b.finish();
     }
     
-    List<Iterator<Term>> subs = new ArrayList<Iterator<Term>>();
+    List<Iterator<Term>> subs = new ArrayList<>();
     for (int i = 0; i < pb.length; i++) {
       subs.add(pb[i].iterator());
     }
     
     Iterator<Term> expected = superSet.iterator();
-    Iterator<Term> actual = new MergedIterator<Term>(subs.toArray(new Iterator[0]));
+    Iterator<Term> actual = new MergedIterator<>(subs.toArray(new Iterator[0]));
     while (actual.hasNext()) {
       assertTrue(expected.hasNext());
       assertEquals(expected.next(), actual.next());

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSegmentReader.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSegmentReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSegmentReader.java Wed Mar 12 18:14:05 2014
@@ -75,11 +75,11 @@ public class TestSegmentReader extends L
   }
   
   public void testGetFieldNameVariations() {
-    Collection<String> allFieldNames = new HashSet<String>();
-    Collection<String> indexedFieldNames = new HashSet<String>();
-    Collection<String> notIndexedFieldNames = new HashSet<String>();
-    Collection<String> tvFieldNames = new HashSet<String>();
-    Collection<String> noTVFieldNames = new HashSet<String>();
+    Collection<String> allFieldNames = new HashSet<>();
+    Collection<String> indexedFieldNames = new HashSet<>();
+    Collection<String> notIndexedFieldNames = new HashSet<>();
+    Collection<String> tvFieldNames = new HashSet<>();
+    Collection<String> noTVFieldNames = new HashSet<>();
 
     for(FieldInfo fieldInfo : reader.getFieldInfos()) {
       final String name = fieldInfo.name;

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java Wed Mar 12 18:14:05 2014
@@ -63,7 +63,7 @@ public class TestSnapshotDeletionPolicy 
     }
   }
 
-  protected List<IndexCommit> snapshots = new ArrayList<IndexCommit>();
+  protected List<IndexCommit> snapshots = new ArrayList<>();
 
   protected void prepareIndexAndSnapshots(SnapshotDeletionPolicy sdp,
       IndexWriter writer, int numSnapshots)

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java Wed Mar 12 18:14:05 2014
@@ -35,7 +35,7 @@ public class TestStressAdvance extends L
       }
       Directory dir = newDirectory();
       RandomIndexWriter w = new RandomIndexWriter(random(), dir);
-      final Set<Integer> aDocs = new HashSet<Integer>();
+      final Set<Integer> aDocs = new HashSet<>();
       final Document doc = new Document();
       final Field f = newStringField("field", "", Field.Store.NO);
       doc.add(f);
@@ -61,8 +61,8 @@ public class TestStressAdvance extends L
 
       w.forceMerge(1);
 
-      final List<Integer> aDocIDs = new ArrayList<Integer>();
-      final List<Integer> bDocIDs = new ArrayList<Integer>();
+      final List<Integer> aDocIDs = new ArrayList<>();
+      final List<Integer> bDocIDs = new ArrayList<>();
 
       final DirectoryReader r = w.getReader();
       final int[] idToDocID = new int[r.maxDoc()];

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java Wed Mar 12 18:14:05 2014
@@ -144,7 +144,7 @@ public class TestStressIndexing2 extends
   }
   
   public DocsAndWriter indexRandomIWReader(int nThreads, int iterations, int range, Directory dir) throws IOException, InterruptedException {
-    Map<String,Document> docs = new HashMap<String,Document>();
+    Map<String,Document> docs = new HashMap<>();
     IndexWriter w = RandomIndexWriter.mockIndexWriter(dir, newIndexWriterConfig(
         TEST_VERSION_CURRENT, new MockAnalyzer(random())).setOpenMode(OpenMode.CREATE).setRAMBufferSizeMB(
             0.1).setMaxBufferedDocs(maxBufferedDocs).setMergePolicy(newLogMergePolicy()), new YieldTestPoint());
@@ -195,7 +195,7 @@ public class TestStressIndexing2 extends
   
   public Map<String,Document> indexRandom(int nThreads, int iterations, int range, Directory dir, int maxThreadStates,
                                           boolean doReaderPooling) throws IOException, InterruptedException {
-    Map<String,Document> docs = new HashMap<String,Document>();
+    Map<String,Document> docs = new HashMap<>();
     IndexWriter w = RandomIndexWriter.mockIndexWriter(dir, newIndexWriterConfig(
         TEST_VERSION_CURRENT, new MockAnalyzer(random())).setOpenMode(OpenMode.CREATE)
              .setRAMBufferSizeMB(0.1).setMaxBufferedDocs(maxBufferedDocs).setIndexerThreadPool(new ThreadAffinityDocumentsWriterThreadPool(maxThreadStates))
@@ -245,7 +245,7 @@ public class TestStressIndexing2 extends
     Iterator<Document> iter = docs.values().iterator();
     while (iter.hasNext()) {
       Document d = iter.next();
-      ArrayList<IndexableField> fields = new ArrayList<IndexableField>();
+      ArrayList<IndexableField> fields = new ArrayList<>();
       fields.addAll(d.getFields());
       // put fields in same order each time
       Collections.sort(fields, fieldNameComparator);
@@ -689,7 +689,7 @@ public class TestStressIndexing2 extends
     int base;
     int range;
     int iterations;
-    Map<String,Document> docs = new HashMap<String,Document>();  
+    Map<String,Document> docs = new HashMap<>();  
     Random r;
 
     public int nextInt(int lim) {
@@ -767,7 +767,7 @@ public class TestStressIndexing2 extends
       customType1.setTokenized(false);
       customType1.setOmitNorms(true);
       
-      ArrayList<Field> fields = new ArrayList<Field>();      
+      ArrayList<Field> fields = new ArrayList<>();      
       String idString = getIdString();
       Field idField =  newField("id", idString, customType1);
       fields.add(idField);

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java Wed Mar 12 18:14:05 2014
@@ -42,8 +42,8 @@ import org.apache.lucene.util.TestUtil;
 public class TestStressNRT extends LuceneTestCase {
   volatile DirectoryReader reader;
 
-  final ConcurrentHashMap<Integer,Long> model = new ConcurrentHashMap<Integer,Long>();
-  Map<Integer,Long> committedModel = new HashMap<Integer,Long>();
+  final ConcurrentHashMap<Integer,Long> model = new ConcurrentHashMap<>();
+  Map<Integer,Long> committedModel = new HashMap<>();
   long snapshotCount;
   long committedModelClock;
   volatile int lastId;
@@ -102,7 +102,7 @@ public class TestStressNRT extends Lucen
 
     final AtomicInteger numCommitting = new AtomicInteger();
 
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
     Directory dir = newDirectory();
 
@@ -128,7 +128,7 @@ public class TestStressNRT extends Lucen
                   DirectoryReader oldReader;
 
                   synchronized(TestStressNRT.this) {
-                    newCommittedModel = new HashMap<Integer,Long>(model);  // take a snapshot
+                    newCommittedModel = new HashMap<>(model);  // take a snapshot
                     version = snapshotCount++;
                     oldReader = reader;
                     oldReader.incRef();  // increment the reference since we will use this for reopening

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java Wed Mar 12 18:14:05 2014
@@ -54,7 +54,7 @@ public class TestTermsEnum extends Lucen
     final IndexReader r = w.getReader();
     w.close();
 
-    final List<BytesRef> terms = new ArrayList<BytesRef>();
+    final List<BytesRef> terms = new ArrayList<>();
     final TermsEnum termsEnum = MultiFields.getTerms(r, "body").iterator(null);
     BytesRef term;
     while((term = termsEnum.next()) != null) {
@@ -188,9 +188,9 @@ public class TestTermsEnum extends Lucen
     final int numTerms = atLeast(300);
     //final int numTerms = 50;
 
-    final Set<String> terms = new HashSet<String>();
-    final Collection<String> pendingTerms = new ArrayList<String>();
-    final Map<BytesRef,Integer> termToID = new HashMap<BytesRef,Integer>();
+    final Set<String> terms = new HashSet<>();
+    final Collection<String> pendingTerms = new ArrayList<>();
+    final Map<BytesRef,Integer> termToID = new HashMap<>();
     int id = 0;
     while(terms.size() != numTerms) {
       final String s = getRandomString();
@@ -205,7 +205,7 @@ public class TestTermsEnum extends Lucen
     addDoc(w, pendingTerms, termToID, id++);
 
     final BytesRef[] termsArray = new BytesRef[terms.size()];
-    final Set<BytesRef> termsSet = new HashSet<BytesRef>();
+    final Set<BytesRef> termsSet = new HashSet<>();
     {
       int upto = 0;
       for(String s : terms) {
@@ -235,8 +235,8 @@ public class TestTermsEnum extends Lucen
 
       // From the random terms, pick some ratio and compile an
       // automaton:
-      final Set<String> acceptTerms = new HashSet<String>();
-      final TreeSet<BytesRef> sortedAcceptTerms = new TreeSet<BytesRef>();
+      final Set<String> acceptTerms = new HashSet<>();
+      final TreeSet<BytesRef> sortedAcceptTerms = new TreeSet<>();
       final double keepPct = random().nextDouble();
       Automaton a;
       if (iter == 0) {
@@ -271,7 +271,7 @@ public class TestTermsEnum extends Lucen
       final CompiledAutomaton c = new CompiledAutomaton(a, true, false);
 
       final BytesRef[] acceptTermsArray = new BytesRef[acceptTerms.size()];
-      final Set<BytesRef> acceptTermsSet = new HashSet<BytesRef>();
+      final Set<BytesRef> acceptTermsSet = new HashSet<>();
       int upto = 0;
       for(String s : acceptTerms) {
         final BytesRef b = new BytesRef(s);
@@ -531,7 +531,7 @@ public class TestTermsEnum extends Lucen
 
   public void testRandomTerms() throws Exception {
     final String[] terms = new String[TestUtil.nextInt(random(), 1, atLeast(1000))];
-    final Set<String> seen = new HashSet<String>();
+    final Set<String> seen = new HashSet<>();
 
     final boolean allowEmptyString = random().nextBoolean();
 
@@ -622,7 +622,7 @@ public class TestTermsEnum extends Lucen
 
     final int END_LOC = -validTerms.length-1;
     
-    final List<TermAndState> termStates = new ArrayList<TermAndState>();
+    final List<TermAndState> termStates = new ArrayList<>();
 
     for(int iter=0;iter<100*RANDOM_MULTIPLIER;iter++) {
 

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum2.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum2.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum2.java Wed Mar 12 18:14:05 2014
@@ -61,7 +61,7 @@ public class TestTermsEnum2 extends Luce
     Document doc = new Document();
     Field field = newStringField("field", "", Field.Store.YES);
     doc.add(field);
-    terms = new TreeSet<BytesRef>();
+    terms = new TreeSet<>();
  
     int num = atLeast(200);
     for (int i = 0; i < num; i++) {
@@ -90,7 +90,7 @@ public class TestTermsEnum2 extends Luce
     for (int i = 0; i < numIterations; i++) {
       String reg = AutomatonTestUtil.randomRegexp(random());
       Automaton automaton = new RegExp(reg, RegExp.NONE).toAutomaton();
-      final List<BytesRef> matchedTerms = new ArrayList<BytesRef>();
+      final List<BytesRef> matchedTerms = new ArrayList<>();
       for(BytesRef t : terms) {
         if (BasicOperations.run(automaton, t.utf8ToString())) {
           matchedTerms.add(t);
@@ -113,7 +113,7 @@ public class TestTermsEnum2 extends Luce
       String reg = AutomatonTestUtil.randomRegexp(random());
       Automaton automaton = new RegExp(reg, RegExp.NONE).toAutomaton();
       TermsEnum te = MultiFields.getTerms(reader, "field").iterator(null);
-      ArrayList<BytesRef> unsortedTerms = new ArrayList<BytesRef>(terms);
+      ArrayList<BytesRef> unsortedTerms = new ArrayList<>(terms);
       Collections.shuffle(unsortedTerms, random());
 
       for (BytesRef term : unsortedTerms) {
@@ -159,7 +159,7 @@ public class TestTermsEnum2 extends Luce
       CompiledAutomaton ca = new CompiledAutomaton(automaton, SpecialOperations.isFinite(automaton), false);
       TermsEnum te = MultiFields.getTerms(reader, "field").intersect(ca, null);
       Automaton expected = BasicOperations.intersection(termsAutomaton, automaton);
-      TreeSet<BytesRef> found = new TreeSet<BytesRef>();
+      TreeSet<BytesRef> found = new TreeSet<>();
       while (te.next() != null) {
         found.add(BytesRef.deepCopyOf(te.term()));
       }

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTransactionRollback.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTransactionRollback.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTransactionRollback.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTransactionRollback.java Wed Mar 12 18:14:05 2014
@@ -69,7 +69,7 @@ public class TestTransactionRollback ext
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(
         TEST_VERSION_CURRENT, new MockAnalyzer(random())).setIndexDeletionPolicy(
         new RollbackDeletionPolicy(id)).setIndexCommit(last));
-    Map<String,String> data = new HashMap<String,String>();
+    Map<String,String> data = new HashMap<>();
     data.put("index", "Rolled back to 1-"+id);
     w.setCommitData(data);
     w.close();
@@ -139,7 +139,7 @@ public class TestTransactionRollback ext
       w.addDocument(doc);
 
       if (currentRecordId%10 == 0) {
-        Map<String,String> data = new HashMap<String,String>();
+        Map<String,String> data = new HashMap<>();
         data.put("index", "records 1-"+currentRecordId);
         w.setCommitData(data);
         w.commit();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java Wed Mar 12 18:14:05 2014
@@ -39,7 +39,7 @@ public class TestUniqueTermCount extends
   Directory dir;
   IndexReader reader;
   /* expected uniqueTermCount values for our documents */
-  ArrayList<Integer> expected = new ArrayList<Integer>();
+  ArrayList<Integer> expected = new ArrayList<>();
   
   @Override
   public void setUp() throws Exception {
@@ -82,7 +82,7 @@ public class TestUniqueTermCount extends
    */
   private String addValue() {
     StringBuilder sb = new StringBuilder();
-    HashSet<String> terms = new HashSet<String>();
+    HashSet<String> terms = new HashSet<>();
     int num = TestUtil.nextInt(random(), 0, 255);
     for (int i = 0; i < num; i++) {
       sb.append(' ');

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java Wed Mar 12 18:14:05 2014
@@ -218,7 +218,7 @@ public class TestBooleanQuery extends Lu
       if (VERBOSE) {
         System.out.println("iter=" + iter);
       }
-      final List<String> terms = new ArrayList<String>(Arrays.asList("a", "b", "c", "d", "e", "f"));
+      final List<String> terms = new ArrayList<>(Arrays.asList("a", "b", "c", "d", "e", "f"));
       final int numTerms = TestUtil.nextInt(random(), 1, terms.size());
       while(terms.size() > numTerms) {
         terms.remove(random().nextInt(terms.size()));
@@ -238,7 +238,7 @@ public class TestBooleanQuery extends Lu
       Scorer scorer = weight.scorer(s.leafContexts.get(0), null);
 
       // First pass: just use .nextDoc() to gather all hits
-      final List<ScoreDoc> hits = new ArrayList<ScoreDoc>();
+      final List<ScoreDoc> hits = new ArrayList<>();
       while(scorer.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
         hits.add(new ScoreDoc(scorer.docID(), scorer.score()));
       }

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java Wed Mar 12 18:14:05 2014
@@ -126,8 +126,8 @@ public class TestBooleanQueryVisitSubsco
     private TopDocsCollector<ScoreDoc> collector;
     private int docBase;
 
-    public final Map<Integer,Integer> docCounts = new HashMap<Integer,Integer>();
-    private final Set<Scorer> tqsSet = new HashSet<Scorer>();
+    public final Map<Integer,Integer> docCounts = new HashMap<>();
+    private final Set<Scorer> tqsSet = new HashSet<>();
     
     MyCollector() {
       collector = TopScoreDocCollector.create(10, true);

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java Wed Mar 12 18:14:05 2014
@@ -98,7 +98,7 @@ public class TestBooleanScorer extends L
     
     BooleanScorer bs = new BooleanScorer(weight, false, 1, Arrays.asList(scorers), Collections.<BulkScorer>emptyList(), scorers.length);
 
-    final List<Integer> hits = new ArrayList<Integer>();
+    final List<Integer> hits = new ArrayList<>();
     bs.score(new Collector() {
       int docBase;
       @Override

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java Wed Mar 12 18:14:05 2014
@@ -65,7 +65,7 @@ public class TestControlledRealTimeReope
   private ControlledRealTimeReopenThread<IndexSearcher> nrtDeletesThread;
   private ControlledRealTimeReopenThread<IndexSearcher> nrtNoDeletesThread;
 
-  private final ThreadLocal<Long> lastGens = new ThreadLocal<Long>();
+  private final ThreadLocal<Long> lastGens = new ThreadLocal<>();
   private boolean warmCalled;
 
   public void testControlledRealTimeReopenThread() throws Exception {
@@ -232,13 +232,13 @@ public class TestControlledRealTimeReope
     nrtNoDeletes = new SearcherManager(writer, false, sf);
     nrtDeletes = new SearcherManager(writer, true, sf);
                          
-    nrtDeletesThread = new ControlledRealTimeReopenThread<IndexSearcher>(genWriter, nrtDeletes, maxReopenSec, minReopenSec);
+    nrtDeletesThread = new ControlledRealTimeReopenThread<>(genWriter, nrtDeletes, maxReopenSec, minReopenSec);
     nrtDeletesThread.setName("NRTDeletes Reopen Thread");
     nrtDeletesThread.setPriority(Math.min(Thread.currentThread().getPriority()+2, Thread.MAX_PRIORITY));
     nrtDeletesThread.setDaemon(true);
     nrtDeletesThread.start();
 
-    nrtNoDeletesThread = new ControlledRealTimeReopenThread<IndexSearcher>(genWriter, nrtNoDeletes, maxReopenSec, minReopenSec);
+    nrtNoDeletesThread = new ControlledRealTimeReopenThread<>(genWriter, nrtNoDeletes, maxReopenSec, minReopenSec);
     nrtNoDeletesThread.setName("NRTNoDeletes Reopen Thread");
     nrtNoDeletesThread.setPriority(Math.min(Thread.currentThread().getPriority()+2, Thread.MAX_PRIORITY));
     nrtNoDeletesThread.setDaemon(true);
@@ -343,7 +343,7 @@ public class TestControlledRealTimeReope
     } finally {
       manager.release(searcher);
     }
-    final ControlledRealTimeReopenThread<IndexSearcher> thread = new ControlledRealTimeReopenThread<IndexSearcher>(writer, manager, 0.01, 0.01);
+    final ControlledRealTimeReopenThread<IndexSearcher> thread = new ControlledRealTimeReopenThread<>(writer, manager, 0.01, 0.01);
     thread.start(); // start reopening
     if (VERBOSE) {
       System.out.println("waiting now for generation " + lastGen);
@@ -482,12 +482,12 @@ public class TestControlledRealTimeReope
     SearcherManager sm = new SearcherManager(iw, true, new SearcherFactory());
     final TrackingIndexWriter tiw = new TrackingIndexWriter(iw);
     ControlledRealTimeReopenThread<IndexSearcher> controlledRealTimeReopenThread =
-      new ControlledRealTimeReopenThread<IndexSearcher>(tiw, sm, maxStaleSecs, 0);
+      new ControlledRealTimeReopenThread<>(tiw, sm, maxStaleSecs, 0);
 
     controlledRealTimeReopenThread.setDaemon(true);
     controlledRealTimeReopenThread.start();
 
-    List<Thread> commitThreads = new ArrayList<Thread>();
+    List<Thread> commitThreads = new ArrayList<>();
 
     for (int i = 0; i < 500; i++) {
       if (i > 0 && i % 50 == 0) {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java Wed Mar 12 18:14:05 2014
@@ -112,7 +112,7 @@ public class TestCustomSearcherSort exte
     // make a query without sorting first
     ScoreDoc[] hitsByRank = searcher.search(query, null, Integer.MAX_VALUE).scoreDocs;
     checkHits(hitsByRank, "Sort by rank: "); // check for duplicates
-    Map<Integer,Integer> resultMap = new TreeMap<Integer,Integer>();
+    Map<Integer,Integer> resultMap = new TreeMap<>();
     // store hits in TreeMap - TreeMap does not allow duplicates; existing
     // entries are silently overwritten
     for (int hitid = 0; hitid < hitsByRank.length; ++hitid) {
@@ -155,7 +155,7 @@ public class TestCustomSearcherSort exte
    */
   private void checkHits(ScoreDoc[] hits, String prefix) {
     if (hits != null) {
-      Map<Integer,Integer> idMap = new TreeMap<Integer,Integer>();
+      Map<Integer,Integer> idMap = new TreeMap<>();
       for (int docnum = 0; docnum < hits.length; ++docnum) {
         Integer luceneId = null;
         

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java Wed Mar 12 18:14:05 2014
@@ -77,7 +77,7 @@ public class TestDocIdSet extends Lucene
       };
 
     DocIdSetIterator iter = filteredSet.iterator();
-    ArrayList<Integer> list = new ArrayList<Integer>();
+    ArrayList<Integer> list = new ArrayList<>();
     int doc = iter.advance(3);
     if (doc != DocIdSetIterator.NO_MORE_DOCS) {
       list.add(Integer.valueOf(doc));

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java Wed Mar 12 18:14:05 2014
@@ -54,7 +54,7 @@ public class TestDocTermOrdsRangeFilter 
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, 
         newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random(), MockTokenizer.KEYWORD, false))
         .setMaxBufferedDocs(TestUtil.nextInt(random(), 50, 1000)));
-    List<String> terms = new ArrayList<String>();
+    List<String> terms = new ArrayList<>();
     int num = atLeast(200);
     for (int i = 0; i < num; i++) {
       Document doc = new Document();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRewriteMethod.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRewriteMethod.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRewriteMethod.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRewriteMethod.java Wed Mar 12 18:14:05 2014
@@ -56,7 +56,7 @@ public class TestDocTermOrdsRewriteMetho
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, 
         newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random(), MockTokenizer.KEYWORD, false))
         .setMaxBufferedDocs(TestUtil.nextInt(random(), 50, 1000)));
-    List<String> terms = new ArrayList<String>();
+    List<String> terms = new ArrayList<>();
     int num = atLeast(200);
     for (int i = 0; i < num; i++) {
       Document doc = new Document();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java Wed Mar 12 18:14:05 2014
@@ -32,7 +32,7 @@ import java.util.Map;
 
 public class TestElevationComparator extends LuceneTestCase {
 
-  private final Map<BytesRef,Integer> priority = new HashMap<BytesRef,Integer>();
+  private final Map<BytesRef,Integer> priority = new HashMap<>();
 
   //@Test
   public void testSorting() throws Throwable {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCache.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCache.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCache.java Wed Mar 12 18:14:05 2014
@@ -285,7 +285,7 @@ public class TestFieldCache extends Luce
     for (int i = 0; i < NUM_DOCS; i++) {
       termOrds.setDocument(i);
       // This will remove identical terms. A DocTermOrds doesn't return duplicate ords for a docId
-      List<BytesRef> values = new ArrayList<BytesRef>(new LinkedHashSet<BytesRef>(Arrays.asList(multiValued[i])));
+      List<BytesRef> values = new ArrayList<>(new LinkedHashSet<>(Arrays.asList(multiValued[i])));
       for (BytesRef v : values) {
         if (v == null) {
           // why does this test use null values... instead of an empty list: confusing

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java Wed Mar 12 18:14:05 2014
@@ -52,17 +52,17 @@ public class TestFieldCacheTermsFilter e
     ScoreDoc[] results;
     MatchAllDocsQuery q = new MatchAllDocsQuery();
 
-    List<String> terms = new ArrayList<String>();
+    List<String> terms = new ArrayList<>();
     terms.add("5");
     results = searcher.search(q, new FieldCacheTermsFilter(fieldName,  terms.toArray(new String[0])), numDocs).scoreDocs;
     assertEquals("Must match nothing", 0, results.length);
 
-    terms = new ArrayList<String>();
+    terms = new ArrayList<>();
     terms.add("10");
     results = searcher.search(q, new FieldCacheTermsFilter(fieldName,  terms.toArray(new String[0])), numDocs).scoreDocs;
     assertEquals("Must match 1", 1, results.length);
 
-    terms = new ArrayList<String>();
+    terms = new ArrayList<>();
     terms.add("10");
     terms.add("20");
     results = searcher.search(q, new FieldCacheTermsFilter(fieldName,  terms.toArray(new String[0])), numDocs).scoreDocs;

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java Wed Mar 12 18:14:05 2014
@@ -78,7 +78,7 @@ public class TestLiveFieldValues extends
     }
 
     final CountDownLatch startingGun = new CountDownLatch(1);
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
     final int iters = atLeast(1000);
     final int idCount = TestUtil.nextInt(random(), 100, 10000);
@@ -95,7 +95,7 @@ public class TestLiveFieldValues extends
           @Override
           public void run() {
             try {
-              Map<String,Integer> values = new HashMap<String,Integer>();
+              Map<String,Integer> values = new HashMap<>();
               List<String> allIDs = Collections.synchronizedList(new ArrayList<String>());
 
               startingGun.await();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java Wed Mar 12 18:14:05 2014
@@ -194,7 +194,7 @@ public class TestMinShouldMatch2 extends
   
   /** test next with giant bq of all terms with varying minShouldMatch */
   public void testNextAllTerms() throws Exception {
-    List<String> termsList = new ArrayList<String>();
+    List<String> termsList = new ArrayList<>();
     termsList.addAll(Arrays.asList(commonTerms));
     termsList.addAll(Arrays.asList(mediumTerms));
     termsList.addAll(Arrays.asList(rareTerms));
@@ -209,7 +209,7 @@ public class TestMinShouldMatch2 extends
   
   /** test advance with giant bq of all terms with varying minShouldMatch */
   public void testAdvanceAllTerms() throws Exception {
-    List<String> termsList = new ArrayList<String>();
+    List<String> termsList = new ArrayList<>();
     termsList.addAll(Arrays.asList(commonTerms));
     termsList.addAll(Arrays.asList(mediumTerms));
     termsList.addAll(Arrays.asList(rareTerms));
@@ -226,7 +226,7 @@ public class TestMinShouldMatch2 extends
   
   /** test next with varying numbers of terms with varying minShouldMatch */
   public void testNextVaryingNumberOfTerms() throws Exception {
-    List<String> termsList = new ArrayList<String>();
+    List<String> termsList = new ArrayList<>();
     termsList.addAll(Arrays.asList(commonTerms));
     termsList.addAll(Arrays.asList(mediumTerms));
     termsList.addAll(Arrays.asList(rareTerms));
@@ -243,7 +243,7 @@ public class TestMinShouldMatch2 extends
   
   /** test advance with varying numbers of terms with varying minShouldMatch */
   public void testAdvanceVaryingNumberOfTerms() throws Exception {
-    List<String> termsList = new ArrayList<String>();
+    List<String> termsList = new ArrayList<>();
     termsList.addAll(Arrays.asList(commonTerms));
     termsList.addAll(Arrays.asList(mediumTerms));
     termsList.addAll(Arrays.asList(rareTerms));
@@ -273,7 +273,7 @@ public class TestMinShouldMatch2 extends
     final SortedSetDocValues dv;
     final int maxDoc;
 
-    final Set<Long> ords = new HashSet<Long>();
+    final Set<Long> ords = new HashSet<>();
     final SimScorer[] sims;
     final int minNrShouldMatch;
     

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java Wed Mar 12 18:14:05 2014
@@ -70,7 +70,7 @@ public class TestMultiPhraseQuery extend
     query1.add(new Term("body", "blueberry"));
     query2.add(new Term("body", "strawberry"));
     
-    LinkedList<Term> termsWithPrefix = new LinkedList<Term>();
+    LinkedList<Term> termsWithPrefix = new LinkedList<>();
     
     // this TermEnum gives "piccadilly", "pie" and "pizza".
     String prefix = "pi";

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java Wed Mar 12 18:14:05 2014
@@ -69,7 +69,7 @@ public class TestPhrasePrefixQuery exten
     query1.add(new Term("body", "blueberry"));
     query2.add(new Term("body", "strawberry"));
     
-    LinkedList<Term> termsWithPrefix = new LinkedList<Term>();
+    LinkedList<Term> termsWithPrefix = new LinkedList<>();
     
     // this TermEnum gives "piccadilly", "pie" and "pizza".
     String prefix = "pi";

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java Wed Mar 12 18:14:05 2014
@@ -599,7 +599,7 @@ public class TestPhraseQuery extends Luc
     Analyzer analyzer = new MockAnalyzer(random());
 
     RandomIndexWriter w  = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer).setMergePolicy(newLogMergePolicy()));
-    List<List<String>> docs = new ArrayList<List<String>>();
+    List<List<String>> docs = new ArrayList<>();
     Document d = new Document();
     Field f = newTextField("f", "", Field.Store.NO);
     d.add(f);
@@ -611,7 +611,7 @@ public class TestPhraseQuery extends Luc
       // must be > 4096 so it spans multiple chunks
       int termCount = TestUtil.nextInt(random(), 4097, 8200);
 
-      List<String> doc = new ArrayList<String>();
+      List<String> doc = new ArrayList<>();
 
       StringBuilder sb = new StringBuilder();
       while(doc.size() < termCount) {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java Wed Mar 12 18:14:05 2014
@@ -88,7 +88,7 @@ public class TestQueryWrapperFilter exte
     final RandomIndexWriter w = new RandomIndexWriter(random(), d);
     w.w.getConfig().setMaxBufferedDocs(17);
     final int numDocs = atLeast(100);
-    final Set<String> aDocs = new HashSet<String>();
+    final Set<String> aDocs = new HashSet<>();
     for(int i=0;i<numDocs;i++) {
       final Document doc = new Document();
       final String v;

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java Wed Mar 12 18:14:05 2014
@@ -67,7 +67,7 @@ public class TestRegexpRandom2 extends L
     Document doc = new Document();
     Field field = newStringField(fieldName, "", Field.Store.NO);
     doc.add(field);
-    List<String> terms = new ArrayList<String>();
+    List<String> terms = new ArrayList<>();
     int num = atLeast(200);
     for (int i = 0; i < num; i++) {
       String s = TestUtil.randomUnicodeString(random());

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSameScoresWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSameScoresWithThreads.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSameScoresWithThreads.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSameScoresWithThreads.java Wed Mar 12 18:14:05 2014
@@ -72,7 +72,7 @@ public class TestSameScoresWithThreads e
     // Target ~10 terms to search:
     double chance = 10.0 / termCount;
     termsEnum = terms.iterator(termsEnum);
-    final Map<BytesRef,TopDocs> answers = new HashMap<BytesRef,TopDocs>();
+    final Map<BytesRef,TopDocs> answers = new HashMap<>();
     while(termsEnum.next() != null) {
       if (random().nextDouble() <= chance) {
         BytesRef term = BytesRef.deepCopyOf(termsEnum.term());
@@ -92,7 +92,7 @@ public class TestSameScoresWithThreads e
               try {
                 startingGun.await();
                 for(int i=0;i<20;i++) {
-                  List<Map.Entry<BytesRef,TopDocs>> shuffled = new ArrayList<Map.Entry<BytesRef,TopDocs>>(answers.entrySet());
+                  List<Map.Entry<BytesRef,TopDocs>> shuffled = new ArrayList<>(answers.entrySet());
                   Collections.shuffle(shuffled);
                   for(Map.Entry<BytesRef,TopDocs> ent : shuffled) {
                     TopDocs actual = s.search(new TermQuery(new Term("body", ent.getKey())), 100);

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java Wed Mar 12 18:14:05 2014
@@ -59,7 +59,7 @@ public class TestSearchAfter extends Luc
   public void setUp() throws Exception {
     super.setUp();
 
-    allSortFields = new ArrayList<SortField>(Arrays.asList(new SortField[] {
+    allSortFields = new ArrayList<>(Arrays.asList(new SortField[] {
           new SortField("byte", SortField.Type.BYTE, false),
           new SortField("short", SortField.Type.SHORT, false),
           new SortField("int", SortField.Type.INT, false),
@@ -134,7 +134,7 @@ public class TestSearchAfter extends Luc
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir);
     int numDocs = atLeast(200);
     for (int i = 0; i < numDocs; i++) {
-      List<Field> fields = new ArrayList<Field>();
+      List<Field> fields = new ArrayList<>();
       fields.add(newTextField("english", English.intToEnglish(i), Field.Store.NO));
       fields.add(newTextField("oddeven", (i % 2 == 0) ? "even" : "odd", Field.Store.NO));
       fields.add(newStringField("byte", "" + ((byte) random().nextInt()), Field.Store.NO));

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java Wed Mar 12 18:14:05 2014
@@ -67,7 +67,7 @@ public class TestSearcherManager extends
 
   private SearcherManager mgr;
   private SearcherLifetimeManager lifetimeMGR;
-  private final List<Long> pastSearchers = new ArrayList<Long>();
+  private final List<Long> pastSearchers = new ArrayList<>();
   private boolean isNRT;
 
   @Override

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestShardSearching.java Wed Mar 12 18:14:05 2014
@@ -82,7 +82,7 @@ public class TestShardSearching extends 
           maxSearcherAgeSeconds
           );
 
-    final List<PreviousSearchState> priorSearches = new ArrayList<PreviousSearchState>();
+    final List<PreviousSearchState> priorSearches = new ArrayList<>();
     List<BytesRef> terms = null;
     while (System.nanoTime() < endTimeNanos) {
 
@@ -175,7 +175,7 @@ public class TestShardSearching extends 
             // TODO: try to "focus" on high freq terms sometimes too
             // TODO: maybe also periodically reset the terms...?
             final TermsEnum termsEnum = MultiFields.getTerms(mockReader, "body").iterator(null);
-            terms = new ArrayList<BytesRef>();
+            terms = new ArrayList<>();
             while(termsEnum.next() != null) {
               terms.add(BytesRef.deepCopyOf(termsEnum.term()));
             }

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java Wed Mar 12 18:14:05 2014
@@ -53,14 +53,14 @@ public class TestSortRandom extends Luce
     final Directory dir = newDirectory();
     final RandomIndexWriter writer = new RandomIndexWriter(random, dir);
     final boolean allowDups = random.nextBoolean();
-    final Set<String> seen = new HashSet<String>();
+    final Set<String> seen = new HashSet<>();
     final int maxLength = TestUtil.nextInt(random, 5, 100);
     if (VERBOSE) {
       System.out.println("TEST: NUM_DOCS=" + NUM_DOCS + " maxLength=" + maxLength + " allowDups=" + allowDups);
     }
 
     int numDocs = 0;
-    final List<BytesRef> docValues = new ArrayList<BytesRef>();
+    final List<BytesRef> docValues = new ArrayList<>();
     // TODO: deletions
     while (numDocs < NUM_DOCS) {
       final Document doc = new Document();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java Wed Mar 12 18:14:05 2014
@@ -69,13 +69,13 @@ public class TestSubScorerFreqs extends 
     private final Collector other;
     private int docBase;
 
-    public final Map<Integer, Map<Query, Float>> docCounts = new HashMap<Integer, Map<Query, Float>>();
+    public final Map<Integer, Map<Query, Float>> docCounts = new HashMap<>();
 
-    private final Map<Query, Scorer> subScorers = new HashMap<Query, Scorer>();
+    private final Map<Query, Scorer> subScorers = new HashMap<>();
     private final Set<String> relationships;
 
     public CountingCollector(Collector other) {
-      this(other, new HashSet<String>(Arrays.asList("MUST", "SHOULD", "MUST_NOT")));
+      this(other, new HashSet<>(Arrays.asList("MUST", "SHOULD", "MUST_NOT")));
     }
 
     public CountingCollector(Collector other, Set<String> relationships) {
@@ -101,7 +101,7 @@ public class TestSubScorerFreqs extends 
 
     @Override
     public void collect(int doc) throws IOException {
-      final Map<Query, Float> freqs = new HashMap<Query, Float>();
+      final Map<Query, Float> freqs = new HashMap<>();
       for (Map.Entry<Query, Scorer> ent : subScorers.entrySet()) {
         Scorer value = ent.getValue();
         int matchId = value.docID();
@@ -165,7 +165,7 @@ public class TestSubScorerFreqs extends 
     // see http://docs.oracle.com/javase/7/docs/api/java/lang/SafeVarargs.html
     @SuppressWarnings("unchecked") final Iterable<Set<String>> occurList = Arrays.asList(
         Collections.singleton("MUST"), 
-        new HashSet<String>(Arrays.asList("MUST", "SHOULD"))
+        new HashSet<>(Arrays.asList("MUST", "SHOULD"))
     );
     
     for (final Set<String> occur : occurList) {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java Wed Mar 12 18:14:05 2014
@@ -81,7 +81,7 @@ public class TestTermScorer extends Luce
     BulkScorer ts = weight.bulkScorer(context, true, context.reader().getLiveDocs());
     // we have 2 documents with the term all in them, one document for all the
     // other values
-    final List<TestHit> docs = new ArrayList<TestHit>();
+    final List<TestHit> docs = new ArrayList<>();
     // must call next first
     
     ts.score(new Collector() {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java Wed Mar 12 18:14:05 2014
@@ -145,7 +145,7 @@ public class TestTopDocsMerge extends Lu
       }
     }
 
-    final List<SortField> sortFields = new ArrayList<SortField>();
+    final List<SortField> sortFields = new ArrayList<>();
     sortFields.add(new SortField("string", SortField.Type.STRING, true));
     sortFields.add(new SortField("string", SortField.Type.STRING, false));
     sortFields.add(new SortField("int", SortField.Type.INT, true));

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java Wed Mar 12 18:14:05 2014
@@ -48,7 +48,7 @@ public class TestSimilarity2 extends Luc
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    sims = new ArrayList<Similarity>();
+    sims = new ArrayList<>();
     sims.add(new DefaultSimilarity());
     sims.add(new BM25Similarity());
     // TODO: not great that we dup this all with TestSimilarityBase

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java Wed Mar 12 18:14:05 2014
@@ -122,7 +122,7 @@ public class TestSimilarityBase extends 
     searcher = newSearcher(reader);
     writer.close();
     
-    sims = new ArrayList<SimilarityBase>();
+    sims = new ArrayList<>();
     for (BasicModel basicModel : BASIC_MODELS) {
       for (AfterEffect afterEffect : AFTER_EFFECTS) {
         for (Normalization normalization : NORMALIZATIONS) {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java Wed Mar 12 18:14:05 2014
@@ -56,8 +56,8 @@ public class MultiSpansWrapper extends S
   }
   
   public static Spans wrap(IndexReaderContext topLevelReaderContext, SpanQuery query) throws IOException {
-    Map<Term,TermContext> termContexts = new HashMap<Term,TermContext>();
-    TreeSet<Term> terms = new TreeSet<Term>();
+    Map<Term,TermContext> termContexts = new HashMap<>();
+    TreeSet<Term> terms = new TreeSet<>();
     query.extractTerms(terms);
     for (Term term : terms) {
       termContexts.put(term, TermContext.build(topLevelReaderContext, term));

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestBasics.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestBasics.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestBasics.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestBasics.java Wed Mar 12 18:14:05 2014
@@ -500,7 +500,7 @@ public class TestBasics extends LuceneTe
     snq = new SpanNearQuery(clauses, 0, true);
     pay = new BytesRef(("pos: " + 0).getBytes("UTF-8"));
     pay2 = new BytesRef(("pos: " + 1).getBytes("UTF-8"));
-    list = new ArrayList<byte[]>();
+    list = new ArrayList<>();
     list.add(pay.bytes);
     list.add(pay2.bytes);
     query = new SpanNearPayloadCheckQuery(snq, list);
@@ -514,7 +514,7 @@ public class TestBasics extends LuceneTe
     pay = new BytesRef(("pos: " + 0).getBytes("UTF-8"));
     pay2 = new BytesRef(("pos: " + 1).getBytes("UTF-8"));
     BytesRef pay3 = new BytesRef(("pos: " + 2).getBytes("UTF-8"));
-    list = new ArrayList<byte[]>();
+    list = new ArrayList<>();
     list.add(pay.bytes);
     list.add(pay2.bytes);
     list.add(pay3.bytes);
@@ -541,7 +541,7 @@ public class TestBasics extends LuceneTe
     query = new SpanPositionRangeQuery(oneThousHunThree, 0, 6);
     checkHits(query, new int[]{1103, 1203,1303,1403,1503,1603,1703,1803,1903});
 
-    Collection<byte[]> payloads = new ArrayList<byte[]>();
+    Collection<byte[]> payloads = new ArrayList<>();
     BytesRef pay = new BytesRef(("pos: " + 0).getBytes("UTF-8"));
     BytesRef pay2 = new BytesRef(("pos: " + 1).getBytes("UTF-8"));
     BytesRef pay3 = new BytesRef(("pos: " + 3).getBytes("UTF-8"));

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java Wed Mar 12 18:14:05 2014
@@ -138,7 +138,7 @@ public class TestFieldMaskingSpanQuery e
 
     QueryUtils.checkEqual(q, qr);
 
-    Set<Term> terms = new HashSet<Term>();
+    Set<Term> terms = new HashSet<>();
     qr.extractTerms(terms);
     assertEquals(1, terms.size());
   }
@@ -158,7 +158,7 @@ public class TestFieldMaskingSpanQuery e
 
     QueryUtils.checkUnequal(q, qr);
 
-    Set<Term> terms = new HashSet<Term>();
+    Set<Term> terms = new HashSet<>();
     qr.extractTerms(terms);
     assertEquals(2, terms.size());
   }
@@ -172,7 +172,7 @@ public class TestFieldMaskingSpanQuery e
 
     QueryUtils.checkEqual(q, qr);
 
-    HashSet<Term> set = new HashSet<Term>();
+    HashSet<Term> set = new HashSet<>();
     qr.extractTerms(set);
     assertEquals(2, set.size());
   }

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java Wed Mar 12 18:14:05 2014
@@ -270,7 +270,7 @@ public class TestPayloadSpans extends Lu
     Spans spans = MultiSpansWrapper.wrap(is.getTopReaderContext(), snq);
 
     TopDocs topDocs = is.search(snq, 1);
-    Set<String> payloadSet = new HashSet<String>();
+    Set<String> payloadSet = new HashSet<>();
     for (int i = 0; i < topDocs.scoreDocs.length; i++) {
       while (spans.next()) {
         Collection<byte[]> payloads = spans.getPayload();
@@ -306,7 +306,7 @@ public class TestPayloadSpans extends Lu
     Spans spans =  MultiSpansWrapper.wrap(is.getTopReaderContext(), snq);
 
     TopDocs topDocs = is.search(snq, 1);
-    Set<String> payloadSet = new HashSet<String>();
+    Set<String> payloadSet = new HashSet<>();
     for (int i = 0; i < topDocs.scoreDocs.length; i++) {
       while (spans.next()) {
         Collection<byte[]> payloads = spans.getPayload();
@@ -341,7 +341,7 @@ public class TestPayloadSpans extends Lu
     Spans spans =  MultiSpansWrapper.wrap(is.getTopReaderContext(), snq);
 
     TopDocs topDocs = is.search(snq, 1);
-    Set<String> payloadSet = new HashSet<String>();
+    Set<String> payloadSet = new HashSet<>();
     for (int i = 0; i < topDocs.scoreDocs.length; i++) {
       while (spans.next()) {
         Collection<byte[]> payloads = spans.getPayload();
@@ -479,8 +479,8 @@ public class TestPayloadSpans extends Lu
   }
 
   final class PayloadFilter extends TokenFilter {
-    Set<String> entities = new HashSet<String>();
-    Set<String> nopayload = new HashSet<String>();
+    Set<String> entities = new HashSet<>();
+    Set<String> nopayload = new HashSet<>();
     int pos;
     PayloadAttribute payloadAtt;
     CharTermAttribute termAtt;

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanMultiTermQueryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanMultiTermQueryWrapper.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanMultiTermQueryWrapper.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanMultiTermQueryWrapper.java Wed Mar 12 18:14:05 2014
@@ -67,7 +67,7 @@ public class TestSpanMultiTermQueryWrapp
   
   public void testWildcard() throws Exception {
     WildcardQuery wq = new WildcardQuery(new Term("field", "bro?n"));
-    SpanQuery swq = new SpanMultiTermQueryWrapper<WildcardQuery>(wq);
+    SpanQuery swq = new SpanMultiTermQueryWrapper<>(wq);
     // will only match quick brown fox
     SpanFirstQuery sfq = new SpanFirstQuery(swq, 2);
     assertEquals(1, searcher.search(sfq, 10).totalHits);
@@ -75,7 +75,7 @@ public class TestSpanMultiTermQueryWrapp
   
   public void testPrefix() throws Exception {
     WildcardQuery wq = new WildcardQuery(new Term("field", "extrem*"));
-    SpanQuery swq = new SpanMultiTermQueryWrapper<WildcardQuery>(wq);
+    SpanQuery swq = new SpanMultiTermQueryWrapper<>(wq);
     // will only match "jumps over extremely very lazy broxn dog"
     SpanFirstQuery sfq = new SpanFirstQuery(swq, 3);
     assertEquals(1, searcher.search(sfq, 10).totalHits);
@@ -83,7 +83,7 @@ public class TestSpanMultiTermQueryWrapp
   
   public void testFuzzy() throws Exception {
     FuzzyQuery fq = new FuzzyQuery(new Term("field", "broan"));
-    SpanQuery sfq = new SpanMultiTermQueryWrapper<FuzzyQuery>(fq);
+    SpanQuery sfq = new SpanMultiTermQueryWrapper<>(fq);
     // will not match quick brown fox
     SpanPositionRangeQuery sprq = new SpanPositionRangeQuery(sfq, 3, 6);
     assertEquals(2, searcher.search(sprq, 10).totalHits);
@@ -92,7 +92,7 @@ public class TestSpanMultiTermQueryWrapp
   public void testFuzzy2() throws Exception {
     // maximum of 1 term expansion
     FuzzyQuery fq = new FuzzyQuery(new Term("field", "broan"), 1, 0, 1, false);
-    SpanQuery sfq = new SpanMultiTermQueryWrapper<FuzzyQuery>(fq);
+    SpanQuery sfq = new SpanMultiTermQueryWrapper<>(fq);
     // will only match jumps over lazy broun dog
     SpanPositionRangeQuery sprq = new SpanPositionRangeQuery(sfq, 0, 100);
     assertEquals(1, searcher.search(sprq, 10).totalHits);
@@ -100,7 +100,7 @@ public class TestSpanMultiTermQueryWrapp
   public void testNoSuchMultiTermsInNear() throws Exception {
     //test to make sure non existent multiterms aren't throwing null pointer exceptions  
     FuzzyQuery fuzzyNoSuch = new FuzzyQuery(new Term("field", "noSuch"), 1, 0, 1, false);
-    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<FuzzyQuery>(fuzzyNoSuch);
+    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<>(fuzzyNoSuch);
     SpanQuery term = new SpanTermQuery(new Term("field", "brown"));
     SpanQuery near = new SpanNearQuery(new SpanQuery[]{term, spanNoSuch}, 1, true);
     assertEquals(0, searcher.search(near, 10).totalHits);
@@ -109,17 +109,17 @@ public class TestSpanMultiTermQueryWrapp
     assertEquals(0, searcher.search(near, 10).totalHits);
     
     WildcardQuery wcNoSuch = new WildcardQuery(new Term("field", "noSuch*"));
-    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<WildcardQuery>(wcNoSuch);
+    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<>(wcNoSuch);
     near = new SpanNearQuery(new SpanQuery[]{term, spanWCNoSuch}, 1, true);
     assertEquals(0, searcher.search(near, 10).totalHits);
   
     RegexpQuery rgxNoSuch = new RegexpQuery(new Term("field", "noSuch"));
-    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<RegexpQuery>(rgxNoSuch);
+    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<>(rgxNoSuch);
     near = new SpanNearQuery(new SpanQuery[]{term, spanRgxNoSuch}, 1, true);
     assertEquals(0, searcher.search(near, 10).totalHits);
     
     PrefixQuery prfxNoSuch = new PrefixQuery(new Term("field", "noSuch"));
-    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<PrefixQuery>(prfxNoSuch);
+    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<>(prfxNoSuch);
     near = new SpanNearQuery(new SpanQuery[]{term, spanPrfxNoSuch}, 1, true);
     assertEquals(0, searcher.search(near, 10).totalHits);
 
@@ -136,7 +136,7 @@ public class TestSpanMultiTermQueryWrapp
   public void testNoSuchMultiTermsInNotNear() throws Exception {
     //test to make sure non existent multiterms aren't throwing non-matching field exceptions  
     FuzzyQuery fuzzyNoSuch = new FuzzyQuery(new Term("field", "noSuch"), 1, 0, 1, false);
-    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<FuzzyQuery>(fuzzyNoSuch);
+    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<>(fuzzyNoSuch);
     SpanQuery term = new SpanTermQuery(new Term("field", "brown"));
     SpanNotQuery notNear = new SpanNotQuery(term, spanNoSuch, 0,0);
     assertEquals(1, searcher.search(notNear, 10).totalHits);
@@ -150,17 +150,17 @@ public class TestSpanMultiTermQueryWrapp
     assertEquals(0, searcher.search(notNear, 10).totalHits);
 
     WildcardQuery wcNoSuch = new WildcardQuery(new Term("field", "noSuch*"));
-    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<WildcardQuery>(wcNoSuch);
+    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<>(wcNoSuch);
     notNear = new SpanNotQuery(term, spanWCNoSuch, 0,0);
     assertEquals(1, searcher.search(notNear, 10).totalHits);
   
     RegexpQuery rgxNoSuch = new RegexpQuery(new Term("field", "noSuch"));
-    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<RegexpQuery>(rgxNoSuch);
+    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<>(rgxNoSuch);
     notNear = new SpanNotQuery(term, spanRgxNoSuch, 1, 1);
     assertEquals(1, searcher.search(notNear, 10).totalHits);
     
     PrefixQuery prfxNoSuch = new PrefixQuery(new Term("field", "noSuch"));
-    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<PrefixQuery>(prfxNoSuch);
+    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<>(prfxNoSuch);
     notNear = new SpanNotQuery(term, spanPrfxNoSuch, 1, 1);
     assertEquals(1, searcher.search(notNear, 10).totalHits);
     
@@ -169,7 +169,7 @@ public class TestSpanMultiTermQueryWrapp
   public void testNoSuchMultiTermsInOr() throws Exception {
     //test to make sure non existent multiterms aren't throwing null pointer exceptions  
     FuzzyQuery fuzzyNoSuch = new FuzzyQuery(new Term("field", "noSuch"), 1, 0, 1, false);
-    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<FuzzyQuery>(fuzzyNoSuch);
+    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<>(fuzzyNoSuch);
     SpanQuery term = new SpanTermQuery(new Term("field", "brown"));
     SpanOrQuery near = new SpanOrQuery(new SpanQuery[]{term, spanNoSuch});
     assertEquals(1, searcher.search(near, 10).totalHits);
@@ -180,17 +180,17 @@ public class TestSpanMultiTermQueryWrapp
 
     
     WildcardQuery wcNoSuch = new WildcardQuery(new Term("field", "noSuch*"));
-    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<WildcardQuery>(wcNoSuch);
+    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<>(wcNoSuch);
     near = new SpanOrQuery(new SpanQuery[]{term, spanWCNoSuch});
     assertEquals(1, searcher.search(near, 10).totalHits);
   
     RegexpQuery rgxNoSuch = new RegexpQuery(new Term("field", "noSuch"));
-    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<RegexpQuery>(rgxNoSuch);
+    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<>(rgxNoSuch);
     near = new SpanOrQuery(new SpanQuery[]{term, spanRgxNoSuch});
     assertEquals(1, searcher.search(near, 10).totalHits);
     
     PrefixQuery prfxNoSuch = new PrefixQuery(new Term("field", "noSuch"));
-    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<PrefixQuery>(prfxNoSuch);
+    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<>(prfxNoSuch);
     near = new SpanOrQuery(new SpanQuery[]{term, spanPrfxNoSuch});
     assertEquals(1, searcher.search(near, 10).totalHits);
     
@@ -206,23 +206,23 @@ public class TestSpanMultiTermQueryWrapp
   public void testNoSuchMultiTermsInSpanFirst() throws Exception {
     //this hasn't been a problem  
     FuzzyQuery fuzzyNoSuch = new FuzzyQuery(new Term("field", "noSuch"), 1, 0, 1, false);
-    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<FuzzyQuery>(fuzzyNoSuch);
+    SpanQuery spanNoSuch = new SpanMultiTermQueryWrapper<>(fuzzyNoSuch);
     SpanQuery spanFirst = new SpanFirstQuery(spanNoSuch, 10);
  
     assertEquals(0, searcher.search(spanFirst, 10).totalHits);
     
     WildcardQuery wcNoSuch = new WildcardQuery(new Term("field", "noSuch*"));
-    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<WildcardQuery>(wcNoSuch);
+    SpanQuery spanWCNoSuch = new SpanMultiTermQueryWrapper<>(wcNoSuch);
     spanFirst = new SpanFirstQuery(spanWCNoSuch, 10);
     assertEquals(0, searcher.search(spanFirst, 10).totalHits);
   
     RegexpQuery rgxNoSuch = new RegexpQuery(new Term("field", "noSuch"));
-    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<RegexpQuery>(rgxNoSuch);
+    SpanQuery spanRgxNoSuch = new SpanMultiTermQueryWrapper<>(rgxNoSuch);
     spanFirst = new SpanFirstQuery(spanRgxNoSuch, 10);
     assertEquals(0, searcher.search(spanFirst, 10).totalHits);
     
     PrefixQuery prfxNoSuch = new PrefixQuery(new Term("field", "noSuch"));
-    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<PrefixQuery>(prfxNoSuch);
+    SpanQuery spanPrfxNoSuch = new SpanMultiTermQueryWrapper<>(prfxNoSuch);
     spanFirst = new SpanFirstQuery(spanPrfxNoSuch, 10);
     assertEquals(0, searcher.search(spanFirst, 10).totalHits);
   }

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestBufferedIndexInput.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestBufferedIndexInput.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestBufferedIndexInput.java Wed Mar 12 18:14:05 2014
@@ -282,7 +282,7 @@ public class TestBufferedIndexInput exte
 
     private static class MockFSDirectory extends BaseDirectory {
 
-      List<IndexInput> allIndexInputs = new ArrayList<IndexInput>();
+      List<IndexInput> allIndexInputs = new ArrayList<>();
 
       Random rand;
 

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java Wed Mar 12 18:14:05 2014
@@ -40,7 +40,7 @@ public class TestFileSwitchDirectory ext
    * Test if writing doc stores to disk and everything else to ram works.
    */
   public void testBasic() throws IOException {
-    Set<String> fileExtensions = new HashSet<String>();
+    Set<String> fileExtensions = new HashSet<>();
     fileExtensions.add(Lucene40StoredFieldsWriter.FIELDS_EXTENSION);
     fileExtensions.add(Lucene40StoredFieldsWriter.FIELDS_INDEX_EXTENSION);
     

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java Wed Mar 12 18:14:05 2014
@@ -30,7 +30,7 @@ public class TestFilterDirectory extends
   public void testOverrides() throws Exception {
     // verify that all methods of Directory are overridden by FilterDirectory,
     // except those under the 'exclude' list
-    Set<String> exclude = new HashSet<String>();
+    Set<String> exclude = new HashSet<>();
     exclude.add("copy");
     exclude.add("createSlicer");
     for (Method m : FilterDirectory.class.getMethods()) {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestHugeRamFile.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestHugeRamFile.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestHugeRamFile.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestHugeRamFile.java Wed Mar 12 18:14:05 2014
@@ -31,7 +31,7 @@ public class TestHugeRamFile extends Luc
    * buffers under maxint. */
   private static class DenseRAMFile extends RAMFile {
     private long capacity = 0;
-    private HashMap<Integer,byte[]> singleBuffers = new HashMap<Integer,byte[]>();
+    private HashMap<Integer,byte[]> singleBuffers = new HashMap<>();
     @Override
     protected byte[] newBuffer(int size) {
       capacity += size;

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java Wed Mar 12 18:14:05 2014
@@ -56,7 +56,7 @@ public class TestNRTCachingDirectory ext
       System.out.println("TEST: numDocs=" + numDocs);
     }
 
-    final List<BytesRef> ids = new ArrayList<BytesRef>();
+    final List<BytesRef> ids = new ArrayList<>();
     DirectoryReader r = null;
     for(int docCount=0;docCount<numDocs;docCount++) {
       final Document doc = docs.nextDoc();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/StressRamUsageEstimator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/StressRamUsageEstimator.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/StressRamUsageEstimator.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/StressRamUsageEstimator.java Wed Mar 12 18:14:05 2014
@@ -149,11 +149,11 @@ public class StressRamUsageEstimator ext
    */
   private void causeGc() {
     List<GarbageCollectorMXBean> garbageCollectorMXBeans = ManagementFactory.getGarbageCollectorMXBeans();
-    List<Long> ccounts = new ArrayList<Long>();
+    List<Long> ccounts = new ArrayList<>();
     for (GarbageCollectorMXBean g : garbageCollectorMXBeans) {
       ccounts.add(g.getCollectionCount());
     }
-    List<Long> ccounts2 = new ArrayList<Long>();
+    List<Long> ccounts2 = new ArrayList<>();
     do {
       System.gc();
       ccounts.clear();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestByteBlockPool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestByteBlockPool.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestByteBlockPool.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestByteBlockPool.java Wed Mar 12 18:14:05 2014
@@ -29,7 +29,7 @@ public class TestByteBlockPool extends L
     boolean reuseFirst = random().nextBoolean();
     for (int j = 0; j < 2; j++) {
         
-      List<BytesRef> list = new ArrayList<BytesRef>();
+      List<BytesRef> list = new ArrayList<>();
       int maxLength = atLeast(500);
       final int numValues = atLeast(100);
       BytesRef ref = new BytesRef();

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefArray.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefArray.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefArray.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefArray.java Wed Mar 12 18:14:05 2014
@@ -31,7 +31,7 @@ public class TestBytesRefArray extends L
   public void testAppend() throws IOException {
     Random random = random();
     BytesRefArray list = new BytesRefArray(Counter.newCounter());
-    List<String> stringList = new ArrayList<String>();
+    List<String> stringList = new ArrayList<>();
     for (int j = 0; j < 2; j++) {
       if (j > 0 && random.nextBoolean()) {
         list.clear();
@@ -73,7 +73,7 @@ public class TestBytesRefArray extends L
   public void testSort() throws IOException {
     Random random = random();
     BytesRefArray list = new BytesRefArray(Counter.newCounter());
-    List<String> stringList = new ArrayList<String>();
+    List<String> stringList = new ArrayList<>();
 
     for (int j = 0; j < 2; j++) {
       if (j > 0 && random.nextBoolean()) {

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefHash.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefHash.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefHash.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/util/TestBytesRefHash.java Wed Mar 12 18:14:05 2014
@@ -95,7 +95,7 @@ public class TestBytesRefHash extends Lu
     BytesRef scratch = new BytesRef();
     int num = atLeast(2);
     for (int j = 0; j < num; j++) {
-      Map<String, Integer> strings = new HashMap<String, Integer>();
+      Map<String, Integer> strings = new HashMap<>();
       int uniqueCount = 0;
       for (int i = 0; i < 797; i++) {
         String str;
@@ -175,7 +175,7 @@ public class TestBytesRefHash extends Lu
     BytesRef ref = new BytesRef();
     int num = atLeast(2);
     for (int j = 0; j < num; j++) {
-      SortedSet<String> strings = new TreeSet<String>();
+      SortedSet<String> strings = new TreeSet<>();
       for (int i = 0; i < 797; i++) {
         String str;
         do {
@@ -213,7 +213,7 @@ public class TestBytesRefHash extends Lu
     BytesRef scratch = new BytesRef();
     int num = atLeast(2);
     for (int j = 0; j < num; j++) {
-      Set<String> strings = new HashSet<String>();
+      Set<String> strings = new HashSet<>();
       int uniqueCount = 0;
       for (int i = 0; i < 797; i++) {
         String str;
@@ -250,7 +250,7 @@ public class TestBytesRefHash extends Lu
     BytesRef scratch = new BytesRef();
     int num = atLeast(2);
     for (int j = 0; j < num; j++) {
-      Set<String> strings = new HashSet<String>();
+      Set<String> strings = new HashSet<>();
       int uniqueCount = 0;
       for (int i = 0; i < 797; i++) {
         String str;
@@ -313,7 +313,7 @@ public class TestBytesRefHash extends Lu
     BytesRefHash offsetHash = newHash(pool);
     int num = atLeast(2);
     for (int j = 0; j < num; j++) {
-      Set<String> strings = new HashSet<String>();
+      Set<String> strings = new HashSet<>();
       int uniqueCount = 0;
       for (int i = 0; i < 797; i++) {
         String str;