lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1576837 [12/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/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java (original)
+++ lucene/dev/branches/branch_4x/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java Wed Mar 12 18:14:05 2014
@@ -183,7 +183,7 @@ public class TestGrouping extends Lucene
     AbstractFirstPassGroupingCollector<?> selected;
     if (random().nextBoolean()) {
       ValueSource vs = new BytesRefFieldSource(groupField);
-      selected = new FunctionFirstPassGroupingCollector(vs, new HashMap<Object, Object>(), groupSort, topDocs);
+      selected = new FunctionFirstPassGroupingCollector(vs, new HashMap<>(), groupSort, topDocs);
     } else {
       selected = new TermFirstPassGroupingCollector(groupField, groupSort, topDocs);
     }
@@ -196,7 +196,7 @@ public class TestGrouping extends Lucene
   private AbstractFirstPassGroupingCollector<?> createFirstPassCollector(String groupField, Sort groupSort, int topDocs, AbstractFirstPassGroupingCollector<?> firstPassGroupingCollector) throws IOException {
     if (TermFirstPassGroupingCollector.class.isAssignableFrom(firstPassGroupingCollector.getClass())) {
       ValueSource vs = new BytesRefFieldSource(groupField);
-      return new FunctionFirstPassGroupingCollector(vs, new HashMap<Object, Object>(), groupSort, topDocs);
+      return new FunctionFirstPassGroupingCollector(vs, new HashMap<>(), groupSort, topDocs);
     } else {
       return new TermFirstPassGroupingCollector(groupField, groupSort, topDocs);
     }
@@ -238,9 +238,9 @@ public class TestGrouping extends Lucene
       return new TermSecondPassGroupingCollector(groupField, searchGroups, groupSort, sortWithinGroup, maxDocsPerGroup , getScores, getMaxScores, fillSortFields);
     } else {
       ValueSource vs = new BytesRefFieldSource(groupField);
-      List<SearchGroup<MutableValue>> mvalSearchGroups = new ArrayList<SearchGroup<MutableValue>>(searchGroups.size());
+      List<SearchGroup<MutableValue>> mvalSearchGroups = new ArrayList<>(searchGroups.size());
       for (SearchGroup<BytesRef> mergedTopGroup : searchGroups) {
-        SearchGroup<MutableValue> sg = new SearchGroup<MutableValue>();
+        SearchGroup<MutableValue> sg = new SearchGroup<>();
         MutableValueStr groupValue = new MutableValueStr();
         if (mergedTopGroup.groupValue != null) {
           groupValue.value =  mergedTopGroup.groupValue;
@@ -253,7 +253,7 @@ public class TestGrouping extends Lucene
         mvalSearchGroups.add(sg);
       }
 
-      return new FunctionSecondPassGroupingCollector(mvalSearchGroups, groupSort, sortWithinGroup, maxDocsPerGroup, getScores, getMaxScores, fillSortFields, vs, new HashMap<Object, Object>());
+      return new FunctionSecondPassGroupingCollector(mvalSearchGroups, groupSort, sortWithinGroup, maxDocsPerGroup, getScores, getMaxScores, fillSortFields, vs, new HashMap<>());
     }
   }
 
@@ -263,7 +263,7 @@ public class TestGrouping extends Lucene
       return new TermAllGroupsCollector(groupField);
     } else {
       ValueSource vs = new BytesRefFieldSource(groupField);
-      return new FunctionAllGroupsCollector(vs, new HashMap<Object, Object>());
+      return new FunctionAllGroupsCollector(vs, new HashMap<>());
     }
   }
 
@@ -299,9 +299,9 @@ public class TestGrouping extends Lucene
         return null;
       }
 
-      List<SearchGroup<BytesRef>> groups = new ArrayList<SearchGroup<BytesRef>>(mutableValueGroups.size());
+      List<SearchGroup<BytesRef>> groups = new ArrayList<>(mutableValueGroups.size());
       for (SearchGroup<MutableValue> mutableValueGroup : mutableValueGroups) {
-        SearchGroup<BytesRef> sg = new SearchGroup<BytesRef>();
+        SearchGroup<BytesRef> sg = new SearchGroup<>();
         sg.groupValue = mutableValueGroup.groupValue.exists() ? ((MutableValueStr) mutableValueGroup.groupValue).value : null;
         sg.sortValues = mutableValueGroup.sortValues;
         groups.add(sg);
@@ -318,12 +318,12 @@ public class TestGrouping extends Lucene
       return ((TermSecondPassGroupingCollector) c).getTopGroups(withinGroupOffset);
     } else if (c.getClass().isAssignableFrom(FunctionSecondPassGroupingCollector.class)) {
       TopGroups<MutableValue> mvalTopGroups = ((FunctionSecondPassGroupingCollector) c).getTopGroups(withinGroupOffset);
-      List<GroupDocs<BytesRef>> groups = new ArrayList<GroupDocs<BytesRef>>(mvalTopGroups.groups.length);
+      List<GroupDocs<BytesRef>> groups = new ArrayList<>(mvalTopGroups.groups.length);
       for (GroupDocs<MutableValue> mvalGd : mvalTopGroups.groups) {
         BytesRef groupValue = mvalGd.groupValue.exists() ? ((MutableValueStr) mvalGd.groupValue).value : null;
-        groups.add(new GroupDocs<BytesRef>(Float.NaN, mvalGd.maxScore, mvalGd.totalHits, mvalGd.scoreDocs, groupValue, mvalGd.groupSortValues));
+        groups.add(new GroupDocs<>(Float.NaN, mvalGd.maxScore, mvalGd.totalHits, mvalGd.scoreDocs, groupValue, mvalGd.groupSortValues));
       }
-      return new TopGroups<BytesRef>(mvalTopGroups.groupSort, mvalTopGroups.withinGroupSort, mvalTopGroups.totalHitCount, mvalTopGroups.totalGroupedHitCount, groups.toArray(new GroupDocs[groups.size()]), Float.NaN);
+      return new TopGroups<>(mvalTopGroups.groupSort, mvalTopGroups.withinGroupSort, mvalTopGroups.totalHitCount, mvalTopGroups.totalGroupedHitCount, groups.toArray(new GroupDocs[groups.size()]), Float.NaN);
     }
     fail();
     return null;
@@ -349,7 +349,7 @@ public class TestGrouping extends Lucene
   }
 
   private Sort getRandomSort() {
-    final List<SortField> sortFields = new ArrayList<SortField>();
+    final List<SortField> sortFields = new ArrayList<>();
     if (random().nextInt(7) == 2) {
       sortFields.add(SortField.FIELD_SCORE);
     } else {
@@ -449,12 +449,12 @@ public class TestGrouping extends Lucene
     final Comparator<GroupDoc> groupSortComp = getComparator(groupSort);
 
     Arrays.sort(groupDocs, groupSortComp);
-    final HashMap<BytesRef,List<GroupDoc>> groups = new HashMap<BytesRef,List<GroupDoc>>();
-    final List<BytesRef> sortedGroups = new ArrayList<BytesRef>();
-    final List<Comparable<?>[]> sortedGroupFields = new ArrayList<Comparable<?>[]>();
+    final HashMap<BytesRef,List<GroupDoc>> groups = new HashMap<>();
+    final List<BytesRef> sortedGroups = new ArrayList<>();
+    final List<Comparable<?>[]> sortedGroupFields = new ArrayList<>();
 
     int totalHitCount = 0;
-    Set<BytesRef> knownGroups = new HashSet<BytesRef>();
+    Set<BytesRef> knownGroups = new HashSet<>();
 
     //System.out.println("TEST: slowGrouping");
     for(GroupDoc d : groupDocs) {
@@ -479,7 +479,7 @@ public class TestGrouping extends Lucene
         if (fillFields) {
           sortedGroupFields.add(fillFields(d, groupSort));
         }
-        l = new ArrayList<GroupDoc>();
+        l = new ArrayList<>();
         groups.put(d.group, l);
       }
       l.add(d);
@@ -519,7 +519,7 @@ public class TestGrouping extends Lucene
         hits = new ScoreDoc[0];
       }
 
-      result[idx-groupOffset] = new GroupDocs<BytesRef>(Float.NaN,
+      result[idx-groupOffset] = new GroupDocs<>(Float.NaN,
                                                         0.0f,
                                                         docs.size(),
                                                         hits,
@@ -528,20 +528,20 @@ public class TestGrouping extends Lucene
     }
 
     if (doAllGroups) {
-      return new TopGroups<BytesRef>(
-                                     new TopGroups<BytesRef>(groupSort.getSort(), docSort.getSort(), totalHitCount, totalGroupedHitCount, result, Float.NaN),
+      return new TopGroups<>(
+                                     new TopGroups<>(groupSort.getSort(), docSort.getSort(), totalHitCount, totalGroupedHitCount, result, Float.NaN),
                                      knownGroups.size()
       );
     } else {
-      return new TopGroups<BytesRef>(groupSort.getSort(), docSort.getSort(), totalHitCount, totalGroupedHitCount, result, Float.NaN);
+      return new TopGroups<>(groupSort.getSort(), docSort.getSort(), totalHitCount, totalGroupedHitCount, result, Float.NaN);
     }
   }
 
   private DirectoryReader getDocBlockReader(Directory dir, GroupDoc[] groupDocs) throws IOException {
     // Coalesce by group, but in random order:
     Collections.shuffle(Arrays.asList(groupDocs), random());
-    final Map<BytesRef,List<GroupDoc>> groupMap = new HashMap<BytesRef,List<GroupDoc>>();
-    final List<BytesRef> groupValues = new ArrayList<BytesRef>();
+    final Map<BytesRef,List<GroupDoc>> groupMap = new HashMap<>();
+    final List<BytesRef> groupValues = new ArrayList<>();
 
     for(GroupDoc groupDoc : groupDocs) {
       if (!groupMap.containsKey(groupDoc.group)) {
@@ -557,7 +557,7 @@ public class TestGrouping extends Lucene
                                                 newIndexWriterConfig(TEST_VERSION_CURRENT,
                                                                      new MockAnalyzer(random())));
 
-    final List<List<Document>> updateDocs = new ArrayList<List<Document>>();
+    final List<List<Document>> updateDocs = new ArrayList<>();
 
     FieldType groupEndType = new FieldType(StringField.TYPE_NOT_STORED);
     groupEndType.setIndexOptions(IndexOptions.DOCS_ONLY);
@@ -565,7 +565,7 @@ public class TestGrouping extends Lucene
 
     //System.out.println("TEST: index groups");
     for(BytesRef group : groupValues) {
-      final List<Document> docs = new ArrayList<Document>();
+      final List<Document> docs = new ArrayList<>();
       //System.out.println("TEST:   group=" + (group == null ? "null" : group.utf8ToString()));
       for(GroupDoc groupValue : groupMap.get(group)) {
         Document doc = new Document();
@@ -637,7 +637,7 @@ public class TestGrouping extends Lucene
         System.out.println("TEST: numDocs=" + numDocs + " numGroups=" + numGroups);
       }
 
-      final List<BytesRef> groups = new ArrayList<BytesRef>();
+      final List<BytesRef> groups = new ArrayList<>();
       for(int i=0;i<numGroups;i++) {
         String randomValue;
         do {
@@ -791,14 +791,14 @@ public class TestGrouping extends Lucene
         // ReaderBlocks only increases maxDoc() vs reader, which
         // means a monotonic shift in scores, so we can
         // reliably remap them w/ Map:
-        final Map<String,Map<Float,Float>> scoreMap = new HashMap<String,Map<Float,Float>>();
+        final Map<String,Map<Float,Float>> scoreMap = new HashMap<>();
 
         // Tricky: must separately set .score2, because the doc
         // block index was created with possible deletions!
         //System.out.println("fixup score2");
         for(int contentID=0;contentID<3;contentID++) {
           //System.out.println("  term=real" + contentID);
-          final Map<Float,Float> termScoreMap = new HashMap<Float,Float>();
+          final Map<Float,Float> termScoreMap = new HashMap<>();
           scoreMap.put("real"+contentID, termScoreMap);
           //System.out.println("term=real" + contentID + " dfold=" + s.docFreq(new Term("content", "real"+contentID)) +
           //" dfnew=" + sBlocks.docFreq(new Term("content", "real"+contentID)));
@@ -942,7 +942,7 @@ public class TestGrouping extends Lucene
 
           // Get 1st pass top groups using shards
 
-          ValueHolder<Boolean> idvBasedImplsUsedSharded = new ValueHolder<Boolean>(false);
+          ValueHolder<Boolean> idvBasedImplsUsedSharded = new ValueHolder<>(false);
           final TopGroups<BytesRef> topGroupsShards = searchShards(s, shards.subSearchers, query, groupSort, docSort,
               groupOffset, topNGroups, docOffset, docsPerGroup, getScores, getMaxScores, canUseIDV, preFlex, idvBasedImplsUsedSharded);
           final AbstractSecondPassGroupingCollector<?> c2;
@@ -974,7 +974,7 @@ public class TestGrouping extends Lucene
 
             if (doAllGroups) {
               TopGroups<BytesRef> tempTopGroups = getTopGroups(c2, docOffset);
-              groupsResult = new TopGroups<BytesRef>(tempTopGroups, allGroupsCollector.getGroupCount());
+              groupsResult = new TopGroups<>(tempTopGroups, allGroupsCollector.getGroupCount());
             } else {
               groupsResult = getTopGroups(c2, docOffset);
             }
@@ -1061,7 +1061,7 @@ public class TestGrouping extends Lucene
           final TopGroups<BytesRef> groupsResultBlocks;
           if (doAllGroups && tempTopGroupsBlocks != null) {
             assertEquals((int) tempTopGroupsBlocks.totalGroupCount, allGroupsCollector2.getGroupCount());
-            groupsResultBlocks = new TopGroups<BytesRef>(tempTopGroupsBlocks, allGroupsCollector2.getGroupCount());
+            groupsResultBlocks = new TopGroups<>(tempTopGroupsBlocks, allGroupsCollector2.getGroupCount());
           } else {
             groupsResultBlocks = tempTopGroupsBlocks;
           }
@@ -1089,7 +1089,7 @@ public class TestGrouping extends Lucene
           // Block index does not index DocValues so we pass
           // false for canUseIDV:
           final TopGroups<BytesRef> topGroupsBlockShards = searchShards(sBlocks, shardsBlocks.subSearchers, query,
-              groupSort, docSort, groupOffset, topNGroups, docOffset, docsPerGroup, getScores, getMaxScores, false, false, new ValueHolder<Boolean>(false));
+              groupSort, docSort, groupOffset, topNGroups, docOffset, docsPerGroup, getScores, getMaxScores, false, false, new ValueHolder<>(false));
 
           if (expectedGroups != null) {
             // Fixup scores for reader2
@@ -1171,8 +1171,8 @@ public class TestGrouping extends Lucene
     }
     // Run 1st pass collector to get top groups per shard
     final Weight w = topSearcher.createNormalizedWeight(query);
-    final List<Collection<SearchGroup<BytesRef>>> shardGroups = new ArrayList<Collection<SearchGroup<BytesRef>>>();
-    List<AbstractFirstPassGroupingCollector<?>> firstPassGroupingCollectors = new ArrayList<AbstractFirstPassGroupingCollector<?>>();
+    final List<Collection<SearchGroup<BytesRef>>> shardGroups = new ArrayList<>();
+    List<AbstractFirstPassGroupingCollector<?>> firstPassGroupingCollectors = new ArrayList<>();
     AbstractFirstPassGroupingCollector<?> firstPassCollector = null;
     boolean shardsCanUseIDV;
     if (canUseIDV) {

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java Wed Mar 12 18:14:05 2014
@@ -156,7 +156,7 @@ public class Highlighter
     TextFragment[] frag =getBestTextFragments(tokenStream,text, true,maxNumFragments);
 
     //Get text
-    ArrayList<String> fragTexts = new ArrayList<String>();
+    ArrayList<String> fragTexts = new ArrayList<>();
     for (int i = 0; i < frag.length; i++)
     {
       if ((frag[i] != null) && (frag[i].getScore() > 0))
@@ -182,7 +182,7 @@ public class Highlighter
     int maxNumFragments)
     throws IOException, InvalidTokenOffsetsException
   {
-    ArrayList<TextFragment> docFrags = new ArrayList<TextFragment>();
+    ArrayList<TextFragment> docFrags = new ArrayList<>();
     StringBuilder newText=new StringBuilder();
 
     CharTermAttribute termAtt = tokenStream.addAttribute(CharTermAttribute.class);
@@ -327,7 +327,7 @@ public class Highlighter
       if(mergeContiguousFragments)
       {
         mergeContiguousFragments(frag);
-        ArrayList<TextFragment> fragTexts = new ArrayList<TextFragment>();
+        ArrayList<TextFragment> fragTexts = new ArrayList<>();
         for (int i = 0; i < frag.length; i++)
         {
           if ((frag[i] != null) && (frag[i].getScore() > 0))

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java Wed Mar 12 18:14:05 2014
@@ -102,7 +102,7 @@ public class QueryScorer implements Scor
    * @param weightedTerms an array of pre-created {@link WeightedSpanTerm}s
    */
   public QueryScorer(WeightedSpanTerm[] weightedTerms) {
-    this.fieldWeightedSpanTerms = new HashMap<String,WeightedSpanTerm>(weightedTerms.length);
+    this.fieldWeightedSpanTerms = new HashMap<>(weightedTerms.length);
 
     for (int i = 0; i < weightedTerms.length; i++) {
       WeightedSpanTerm existingTerm = fieldWeightedSpanTerms.get(weightedTerms[i].term);
@@ -239,7 +239,7 @@ public class QueryScorer implements Scor
    */
   @Override
   public void startFragment(TextFragment newFragment) {
-    foundTerms = new HashSet<String>();
+    foundTerms = new HashSet<>();
     totalScore = 0;
   }
   

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermExtractor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermExtractor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermExtractor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermExtractor.java Wed Mar 12 18:14:05 2014
@@ -88,7 +88,7 @@ public final class QueryTermExtractor
    */
   public static final WeightedTerm[] getTerms(Query query, boolean prohibited, String fieldName)
   {
-    HashSet<WeightedTerm> terms=new HashSet<WeightedTerm>();
+    HashSet<WeightedTerm> terms=new HashSet<>();
     getTerms(query,terms,prohibited,fieldName);
     return terms.toArray(new WeightedTerm[0]);
   }
@@ -112,7 +112,7 @@ public final class QueryTermExtractor
       else if (query instanceof FilteredQuery)
         getTermsFromFilteredQuery((FilteredQuery) query, terms, prohibited, fieldName);
       else {
-        HashSet<Term> nonWeightedTerms = new HashSet<Term>();
+        HashSet<Term> nonWeightedTerms = new HashSet<>();
         query.extractTerms(nonWeightedTerms);
         for (Iterator<Term> iter = nonWeightedTerms.iterator(); iter.hasNext(); ) {
           Term term = iter.next();

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermScorer.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermScorer.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/QueryTermScorer.java Wed Mar 12 18:14:05 2014
@@ -77,7 +77,7 @@ public class QueryTermScorer implements 
   }
 
   public QueryTermScorer(WeightedTerm[] weightedTerms) {
-    termsToFind = new HashMap<String,WeightedTerm>();
+    termsToFind = new HashMap<>();
     for (int i = 0; i < weightedTerms.length; i++) {
       WeightedTerm existingTerm = termsToFind
           .get(weightedTerms[i].term);
@@ -109,7 +109,7 @@ public class QueryTermScorer implements 
    */
   @Override
   public void startFragment(TextFragment newFragment) {
-    uniqueTermsInFragment = new HashSet<String>();
+    uniqueTermsInFragment = new HashSet<>();
     currentTextFragment = newFragment;
     totalScore = 0;
 

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java Wed Mar 12 18:14:05 2014
@@ -258,7 +258,7 @@ public class TokenSources {
           // tokens NOT stored with positions or not guaranteed contiguous - must
           // add to list and sort later
           if (unsortedTokens == null) {
-            unsortedTokens = new ArrayList<Token>();
+            unsortedTokens = new ArrayList<>();
           }
           unsortedTokens.add(token);
         }

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenStreamFromTermPositionVector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenStreamFromTermPositionVector.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenStreamFromTermPositionVector.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenStreamFromTermPositionVector.java Wed Mar 12 18:14:05 2014
@@ -39,7 +39,7 @@ import org.apache.lucene.util.Collection
  */
 public final class TokenStreamFromTermPositionVector extends TokenStream {
 
-  private final List<Token> positionedTokens = new ArrayList<Token>();
+  private final List<Token> positionedTokens = new ArrayList<>();
 
   private Iterator<Token> tokensAtCurrentPosition;
 

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTerm.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTerm.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTerm.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTerm.java Wed Mar 12 18:14:05 2014
@@ -28,11 +28,11 @@ import java.util.List;
  */
 public class WeightedSpanTerm extends WeightedTerm{
   boolean positionSensitive;
-  private List<PositionSpan> positionSpans = new ArrayList<PositionSpan>();
+  private List<PositionSpan> positionSpans = new ArrayList<>();
 
   public WeightedSpanTerm(float weight, String term) {
     super(weight, term);
-    this.positionSpans = new ArrayList<PositionSpan>();
+    this.positionSpans = new ArrayList<>();
   }
 
   public WeightedSpanTerm(float weight, String term, boolean positionSensitive) {

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java Wed Mar 12 18:14:05 2014
@@ -175,7 +175,7 @@ public class WeightedSpanTermExtractor {
           final Term[] termArray = termArrays.get(i);
           List<SpanQuery> disjuncts = disjunctLists[positions[i]];
           if (disjuncts == null) {
-            disjuncts = (disjunctLists[positions[i]] = new ArrayList<SpanQuery>(termArray.length));
+            disjuncts = (disjunctLists[positions[i]] = new ArrayList<>(termArray.length));
             ++distinctPositions;
           }
           for (int j = 0; j < termArray.length; ++j) {
@@ -243,10 +243,10 @@ public class WeightedSpanTermExtractor {
     Set<String> fieldNames;
 
     if (fieldName == null) {
-      fieldNames = new HashSet<String>();
+      fieldNames = new HashSet<>();
       collectSpanQueryFields(spanQuery, fieldNames);
     } else {
-      fieldNames = new HashSet<String>(1);
+      fieldNames = new HashSet<>(1);
       fieldNames.add(fieldName);
     }
     // To support the use of the default field name
@@ -254,9 +254,9 @@ public class WeightedSpanTermExtractor {
       fieldNames.add(defaultField);
     }
     
-    Map<String, SpanQuery> queries = new HashMap<String, SpanQuery>();
+    Map<String, SpanQuery> queries = new HashMap<>();
  
-    Set<Term> nonWeightedTerms = new HashSet<Term>();
+    Set<Term> nonWeightedTerms = new HashSet<>();
     final boolean mustRewriteQuery = mustRewriteQuery(spanQuery);
     if (mustRewriteQuery) {
       for (final String field : fieldNames) {
@@ -268,7 +268,7 @@ public class WeightedSpanTermExtractor {
       spanQuery.extractTerms(nonWeightedTerms);
     }
 
-    List<PositionSpan> spanPositions = new ArrayList<PositionSpan>();
+    List<PositionSpan> spanPositions = new ArrayList<>();
 
     for (final String field : fieldNames) {
       final SpanQuery q;
@@ -278,8 +278,8 @@ public class WeightedSpanTermExtractor {
         q = spanQuery;
       }
       AtomicReaderContext context = getLeafContext();
-      Map<Term,TermContext> termContexts = new HashMap<Term,TermContext>();
-      TreeSet<Term> extractedTerms = new TreeSet<Term>();
+      Map<Term,TermContext> termContexts = new HashMap<>();
+      TreeSet<Term> extractedTerms = new TreeSet<>();
       q.extractTerms(extractedTerms);
       for (Term term : extractedTerms) {
         termContexts.put(term, TermContext.build(context, term));
@@ -328,7 +328,7 @@ public class WeightedSpanTermExtractor {
    * @throws IOException If there is a low-level I/O error
    */
   protected void extractWeightedTerms(Map<String,WeightedSpanTerm> terms, Query query) throws IOException {
-    Set<Term> nonWeightedTerms = new HashSet<Term>();
+    Set<Term> nonWeightedTerms = new HashSet<>();
     query.extractTerms(nonWeightedTerms);
 
     for (final Term queryTerm : nonWeightedTerms) {
@@ -468,7 +468,7 @@ public class WeightedSpanTermExtractor {
       this.fieldName = null;
     }
 
-    Map<String,WeightedSpanTerm> terms = new PositionCheckingMap<String>();
+    Map<String,WeightedSpanTerm> terms = new PositionCheckingMap<>();
     this.tokenStream = tokenStream;
     try {
       extract(query, terms);
@@ -505,7 +505,7 @@ public class WeightedSpanTermExtractor {
     }
     this.tokenStream = tokenStream;
 
-    Map<String,WeightedSpanTerm> terms = new PositionCheckingMap<String>();
+    Map<String,WeightedSpanTerm> terms = new PositionCheckingMap<>();
     extract(query, terms);
 
     int totalNumDocs = reader.maxDoc();

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/MultiTermHighlighting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/MultiTermHighlighting.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/MultiTermHighlighting.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/MultiTermHighlighting.java Wed Mar 12 18:14:05 2014
@@ -60,7 +60,7 @@ class MultiTermHighlighting {
    * automata that will match terms.
    */
   static CharacterRunAutomaton[] extractAutomata(Query query, String field) {
-    List<CharacterRunAutomaton> list = new ArrayList<CharacterRunAutomaton>();
+    List<CharacterRunAutomaton> list = new ArrayList<>();
     if (query instanceof BooleanQuery) {
       BooleanClause clauses[] = ((BooleanQuery) query).getClauses();
       for (BooleanClause clause : clauses) {

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/PostingsHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/PostingsHighlighter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/PostingsHighlighter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/PostingsHighlighter.java Wed Mar 12 18:14:05 2014
@@ -299,7 +299,7 @@ public class PostingsHighlighter {
    *         {@link IndexOptions#DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS}
    */
   public Map<String,String[]> highlightFields(String fieldsIn[], Query query, IndexSearcher searcher, int[] docidsIn, int maxPassagesIn[]) throws IOException {
-    Map<String,String[]> snippets = new HashMap<String,String[]>();
+    Map<String,String[]> snippets = new HashMap<>();
     for(Map.Entry<String,Object[]> ent : highlightFieldsAsObjects(fieldsIn, query, searcher, docidsIn, maxPassagesIn).entrySet()) {
       Object[] snippetObjects = ent.getValue();
       String[] snippetStrings = new String[snippetObjects.length];
@@ -346,7 +346,7 @@ public class PostingsHighlighter {
     }
     final IndexReader reader = searcher.getIndexReader();
     Query rewritten = rewrite(query);
-    SortedSet<Term> queryTerms = new TreeSet<Term>();
+    SortedSet<Term> queryTerms = new TreeSet<>();
     rewritten.extractTerms(queryTerms);
 
     IndexReaderContext readerContext = reader.getContext();
@@ -384,7 +384,7 @@ public class PostingsHighlighter {
     // pull stored data:
     String[][] contents = loadFieldValues(searcher, fields, docids, maxLength);
     
-    Map<String,Object[]> highlights = new HashMap<String,Object[]>();
+    Map<String,Object[]> highlights = new HashMap<>();
     for (int i = 0; i < fields.length; i++) {
       String field = fields[i];
       int numPassages = maxPassages[i];
@@ -454,7 +454,7 @@ public class PostingsHighlighter {
   }
     
   private Map<Integer,Object> highlightField(String field, String contents[], BreakIterator bi, BytesRef terms[], int[] docids, List<AtomicReaderContext> leaves, int maxPassages, Query query) throws IOException {  
-    Map<Integer,Object> highlights = new HashMap<Integer,Object>();
+    Map<Integer,Object> highlights = new HashMap<>();
     
     PassageFormatter fieldFormatter = getFormatter(field);
     if (fieldFormatter == null) {
@@ -539,7 +539,7 @@ public class PostingsHighlighter {
     if (scorer == null) {
       throw new NullPointerException("PassageScorer cannot be null");
     }
-    PriorityQueue<OffsetsEnum> pq = new PriorityQueue<OffsetsEnum>();
+    PriorityQueue<OffsetsEnum> pq = new PriorityQueue<>();
     float weights[] = new float[terms.length];
     // initialize postings
     for (int i = 0; i < terms.length; i++) {
@@ -574,7 +574,7 @@ public class PostingsHighlighter {
     
     pq.add(new OffsetsEnum(EMPTY, Integer.MAX_VALUE)); // a sentinel for termination
     
-    PriorityQueue<Passage> passageQueue = new PriorityQueue<Passage>(n, new Comparator<Passage>() {
+    PriorityQueue<Passage> passageQueue = new PriorityQueue<>(n, new Comparator<Passage>() {
       @Override
       public int compare(Passage left, Passage right) {
         if (left.score < right.score) {
@@ -678,7 +678,7 @@ public class PostingsHighlighter {
    *  to customize. */
   protected Passage[] getEmptyHighlight(String fieldName, BreakIterator bi, int maxPassages) {
     // BreakIterator should be un-next'd:
-    List<Passage> passages = new ArrayList<Passage>();
+    List<Passage> passages = new ArrayList<>();
     int pos = bi.current();
     assert pos == 0;
     while (passages.size() < maxPassages) {

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragListBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragListBuilder.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragListBuilder.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragListBuilder.java Wed Mar 12 18:14:05 2014
@@ -50,8 +50,8 @@ public abstract class BaseFragListBuilde
     if( fragCharSize < minFragCharSize )
       throw new IllegalArgumentException( "fragCharSize(" + fragCharSize + ") is too small. It must be " + minFragCharSize + " or higher." );
     
-    List<WeightedPhraseInfo> wpil = new ArrayList<WeightedPhraseInfo>();
-    IteratorQueue<WeightedPhraseInfo> queue = new IteratorQueue<WeightedPhraseInfo>(fieldPhraseList.getPhraseList().iterator());
+    List<WeightedPhraseInfo> wpil = new ArrayList<>();
+    IteratorQueue<WeightedPhraseInfo> queue = new IteratorQueue<>(fieldPhraseList.getPhraseList().iterator());
     WeightedPhraseInfo phraseInfo = null;
     int startOffset = 0;
     while((phraseInfo = queue.top()) != null){

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java Wed Mar 12 18:14:05 2014
@@ -135,7 +135,7 @@ public abstract class BaseFragmentsBuild
 
     fragInfos = getWeightedFragInfoList(fragInfos);
     int limitFragments = maxNumFragments < fragInfos.size() ? maxNumFragments : fragInfos.size();
-    List<String> fragments = new ArrayList<String>( limitFragments );
+    List<String> fragments = new ArrayList<>( limitFragments );
 
     StringBuilder buffer = new StringBuilder();
     int[] nextValueIndex = { 0 };
@@ -148,7 +148,7 @@ public abstract class BaseFragmentsBuild
   
   protected Field[] getFields( IndexReader reader, int docId, final String fieldName) throws IOException {
     // according to javadoc, doc.getFields(fieldName) cannot be used with lazy loaded field???
-    final List<Field> fields = new ArrayList<Field>();
+    final List<Field> fields = new ArrayList<>();
     reader.document(docId, new StoredFieldVisitor() {
         
         @Override
@@ -215,7 +215,7 @@ public abstract class BaseFragmentsBuild
   }
 
   protected List<WeightedFragInfo> discreteMultiValueHighlighting(List<WeightedFragInfo> fragInfos, Field[] fields) {
-    Map<String, List<WeightedFragInfo>> fieldNameToFragInfos = new HashMap<String, List<WeightedFragInfo>>();
+    Map<String, List<WeightedFragInfo>> fieldNameToFragInfos = new HashMap<>();
     for (Field field : fields) {
       fieldNameToFragInfos.put(field.name(), new ArrayList<WeightedFragInfo>());
     }
@@ -257,12 +257,12 @@ public abstract class BaseFragmentsBuild
         }
 
 
-        List<SubInfo> subInfos = new ArrayList<SubInfo>();
+        List<SubInfo> subInfos = new ArrayList<>();
         Iterator<SubInfo> subInfoIterator = fragInfo.getSubInfos().iterator();
         float boost = 0.0f;  //  The boost of the new info will be the sum of the boosts of its SubInfos
         while (subInfoIterator.hasNext()) {
           SubInfo subInfo = subInfoIterator.next();
-          List<Toffs> toffsList = new ArrayList<Toffs>();
+          List<Toffs> toffsList = new ArrayList<>();
           Iterator<Toffs> toffsIterator = subInfo.getTermsOffsets().iterator();
           while (toffsIterator.hasNext()) {
             Toffs toffs = toffsIterator.next();
@@ -286,7 +286,7 @@ public abstract class BaseFragmentsBuild
       }
     }
 
-    List<WeightedFragInfo> result = new ArrayList<WeightedFragInfo>();
+    List<WeightedFragInfo> result = new ArrayList<>();
     for (List<WeightedFragInfo> weightedFragInfos : fieldNameToFragInfos.values()) {
       result.addAll(weightedFragInfos);
     }

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java Wed Mar 12 18:14:05 2014
@@ -29,7 +29,7 @@ import java.util.List;
  */
 public abstract class FieldFragList {
 
-  private List<WeightedFragInfo> fragInfos = new ArrayList<WeightedFragInfo>();
+  private List<WeightedFragInfo> fragInfos = new ArrayList<>();
 
   /**
    * a constructor.

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java Wed Mar 12 18:14:05 2014
@@ -34,7 +34,7 @@ public class FieldPhraseList {
   /**
    * List of non-overlapping WeightedPhraseInfo objects.
    */
-  LinkedList<WeightedPhraseInfo> phraseList = new LinkedList<WeightedPhraseInfo>();
+  LinkedList<WeightedPhraseInfo> phraseList = new LinkedList<>();
   
   /**
    * create a FieldPhraseList that has no limit on the number of phrases to analyze
@@ -65,7 +65,7 @@ public class FieldPhraseList {
   public FieldPhraseList( FieldTermStack fieldTermStack, FieldQuery fieldQuery, int phraseLimit ){
     final String field = fieldTermStack.getFieldName();
 
-    LinkedList<TermInfo> phraseCandidate = new LinkedList<TermInfo>();
+    LinkedList<TermInfo> phraseCandidate = new LinkedList<>();
     QueryPhraseMap currMap = null;
     QueryPhraseMap nextMap = null;
     while( !fieldTermStack.isEmpty() && (phraseList.size() < phraseLimit) )
@@ -125,13 +125,13 @@ public class FieldPhraseList {
     for ( FieldPhraseList fplToMerge : toMerge ) {
       allInfos[ index++ ] = fplToMerge.phraseList.iterator();
     }
-    MergedIterator< WeightedPhraseInfo > itr = new MergedIterator< WeightedPhraseInfo >( false, allInfos );
+    MergedIterator< WeightedPhraseInfo > itr = new MergedIterator<>( false, allInfos );
     // Step 2.  Walk the sorted list merging infos that overlap
-    phraseList = new LinkedList< WeightedPhraseInfo >();
+    phraseList = new LinkedList<>();
     if ( !itr.hasNext() ) {
       return;
     }
-    List< WeightedPhraseInfo > work = new ArrayList< WeightedPhraseInfo >();
+    List< WeightedPhraseInfo > work = new ArrayList<>();
     WeightedPhraseInfo first = itr.next();
     work.add( first );
     int workEndOffset = first.getEndOffset();
@@ -225,9 +225,9 @@ public class FieldPhraseList {
       this.seqnum = seqnum;
       
       // We keep TermInfos for further operations
-      termsInfos = new ArrayList<TermInfo>( terms );
+      termsInfos = new ArrayList<>( terms );
       
-      termsOffsets = new ArrayList<Toffs>( terms.size() );
+      termsOffsets = new ArrayList<>( terms.size() );
       TermInfo ti = terms.get( 0 );
       termsOffsets.add( new Toffs( ti.getStartOffset(), ti.getEndOffset() ) );
       if( terms.size() == 1 ){
@@ -261,7 +261,7 @@ public class FieldPhraseList {
       WeightedPhraseInfo first = toMergeItr.next();
       @SuppressWarnings( { "rawtypes", "unchecked" } )
       Iterator< Toffs >[] allToffs = new Iterator[ toMerge.size() ];
-      termsInfos = new ArrayList< TermInfo >();
+      termsInfos = new ArrayList<>();
       seqnum = first.seqnum;
       boost = first.boost;
       allToffs[ 0 ] = first.termsOffsets.iterator();
@@ -273,8 +273,8 @@ public class FieldPhraseList {
         allToffs[ index++ ] = info.termsOffsets.iterator();
       }
       // Step 2.  Walk the sorted list merging overlaps
-      MergedIterator< Toffs > itr = new MergedIterator< Toffs >( false, allToffs );
-      termsOffsets = new ArrayList< Toffs >();
+      MergedIterator< Toffs > itr = new MergedIterator<>( false, allToffs );
+      termsOffsets = new ArrayList<>();
       if ( !itr.hasNext() ) {
         return;
       }

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldQuery.java Wed Mar 12 18:14:05 2014
@@ -50,11 +50,11 @@ public class FieldQuery {
 
   // fieldMatch==true,  Map<fieldName,QueryPhraseMap>
   // fieldMatch==false, Map<null,QueryPhraseMap>
-  Map<String, QueryPhraseMap> rootMaps = new HashMap<String, QueryPhraseMap>();
+  Map<String, QueryPhraseMap> rootMaps = new HashMap<>();
 
   // fieldMatch==true,  Map<fieldName,setOfTermsInQueries>
   // fieldMatch==false, Map<null,setOfTermsInQueries>
-  Map<String, Set<String>> termSetMap = new HashMap<String, Set<String>>();
+  Map<String, Set<String>> termSetMap = new HashMap<>();
 
   int termOrPhraseNumber; // used for colored tag support
 
@@ -63,7 +63,7 @@ public class FieldQuery {
 
   FieldQuery( Query query, IndexReader reader, boolean phraseHighlight, boolean fieldMatch ) throws IOException {
     this.fieldMatch = fieldMatch;
-    Set<Query> flatQueries = new LinkedHashSet<Query>();
+    Set<Query> flatQueries = new LinkedHashSet<>();
     flatten( query, reader, flatQueries );
     saveTerms( flatQueries, reader );
     Collection<Query> expandQueries = expand( flatQueries );
@@ -169,7 +169,7 @@ public class FieldQuery {
    *      => expandQueries={a,"b c","c d","b c d"}
    */
   Collection<Query> expand( Collection<Query> flatQueries ){
-    Set<Query> expandQueries = new LinkedHashSet<Query>();
+    Set<Query> expandQueries = new LinkedHashSet<>();
     for( Iterator<Query> i = flatQueries.iterator(); i.hasNext(); ){
       Query query = i.next();
       i.remove();
@@ -316,7 +316,7 @@ public class FieldQuery {
     String key = getKey( query );
     Set<String> set = termSetMap.get( key );
     if( set == null ){
-      set = new HashSet<String>();
+      set = new HashSet<>();
       termSetMap.put( key, set );
     }
     return set;
@@ -364,7 +364,7 @@ public class FieldQuery {
     float boost;  // valid if terminal == true
     int termOrPhraseNumber;   // valid if terminal == true
     FieldQuery fieldQuery;
-    Map<String, QueryPhraseMap> subMap = new HashMap<String, QueryPhraseMap>();
+    Map<String, QueryPhraseMap> subMap = new HashMap<>();
     
     public QueryPhraseMap( FieldQuery fieldQuery ){
       this.fieldQuery = fieldQuery;

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java Wed Mar 12 18:14:05 2014
@@ -38,7 +38,7 @@ import org.apache.lucene.util.UnicodeUti
 public class FieldTermStack {
   
   private final String fieldName;
-  LinkedList<TermInfo> termList = new LinkedList<TermInfo>();
+  LinkedList<TermInfo> termList = new LinkedList<>();
   
   //public static void main( String[] args ) throws Exception {
   //  Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_CURRENT);

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleBoundaryScanner.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleBoundaryScanner.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleBoundaryScanner.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleBoundaryScanner.java Wed Mar 12 18:14:05 2014
@@ -47,7 +47,7 @@ public class SimpleBoundaryScanner imple
   
   public SimpleBoundaryScanner( int maxScan, Character[] boundaryChars ){
     this.maxScan = maxScan;
-    this.boundaryChars = new HashSet<Character>();
+    this.boundaryChars = new HashSet<>();
     this.boundaryChars.addAll(Arrays.asList(boundaryChars));
   }
   

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFieldFragList.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFieldFragList.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFieldFragList.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFieldFragList.java Wed Mar 12 18:14:05 2014
@@ -43,7 +43,7 @@ public class SimpleFieldFragList extends
   @Override
   public void add( int startOffset, int endOffset, List<WeightedPhraseInfo> phraseInfoList ) {
     float totalBoost = 0;
-    List<SubInfo> subInfos = new ArrayList<SubInfo>();
+    List<SubInfo> subInfos = new ArrayList<>();
     for( WeightedPhraseInfo phraseInfo : phraseInfoList ){
       subInfos.add( new SubInfo( phraseInfo.getText(), phraseInfo.getTermsOffsets(), phraseInfo.getSeqnum(), phraseInfo.getBoost() ) );
       totalBoost += phraseInfo.getBoost();

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SingleFragListBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SingleFragListBuilder.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SingleFragListBuilder.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/SingleFragListBuilder.java Wed Mar 12 18:14:05 2014
@@ -41,7 +41,7 @@ public class SingleFragListBuilder imple
 
     FieldFragList ffl = new SimpleFieldFragList( fragCharSize );
 
-    List<WeightedPhraseInfo> wpil = new ArrayList<WeightedPhraseInfo>();
+    List<WeightedPhraseInfo> wpil = new ArrayList<>();
     Iterator<WeightedPhraseInfo> ite = fieldPhraseList.phraseList.iterator();
     WeightedPhraseInfo phraseInfo = null;
     while( true ){

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/WeightedFieldFragList.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/WeightedFieldFragList.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/WeightedFieldFragList.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/java/org/apache/lucene/search/vectorhighlight/WeightedFieldFragList.java Wed Mar 12 18:14:05 2014
@@ -44,9 +44,9 @@ public class WeightedFieldFragList exten
    */ 
   @Override
   public void add( int startOffset, int endOffset, List<WeightedPhraseInfo> phraseInfoList ) {
-    List<SubInfo> tempSubInfos = new ArrayList<SubInfo>();
-    List<SubInfo> realSubInfos = new ArrayList<SubInfo>();
-    HashSet<String> distinctTerms = new HashSet<String>();   
+    List<SubInfo> tempSubInfos = new ArrayList<>();
+    List<SubInfo> realSubInfos = new ArrayList<>();
+    HashSet<String> distinctTerms = new HashSet<>();
     int length = 0;
 
     for( WeightedPhraseInfo phraseInfo : phraseInfoList ){

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java Wed Mar 12 18:14:05 2014
@@ -418,7 +418,7 @@ public class HighlighterTest extends Bas
   }
   
   public void testSpanRegexQuery() throws Exception {
-    query = new SpanOrQuery(new SpanMultiTermQueryWrapper<RegexpQuery>(new RegexpQuery(new Term(FIELD_NAME, "ken.*"))));
+    query = new SpanOrQuery(new SpanMultiTermQueryWrapper<>(new RegexpQuery(new Term(FIELD_NAME, "ken.*"))));
     searcher = newSearcher(reader);
     hits = searcher.search(query, 100);
     int maxNumFragmentsRequired = 2;
@@ -1172,12 +1172,12 @@ public class HighlighterTest extends Bas
         WeightedSpanTerm[] wTerms = new WeightedSpanTerm[2];
         wTerms[0] = new WeightedSpanTerm(10f, "hello");
 
-        List<PositionSpan> positionSpans = new ArrayList<PositionSpan>();
+        List<PositionSpan> positionSpans = new ArrayList<>();
         positionSpans.add(new PositionSpan(0, 0));
         wTerms[0].addPositionSpans(positionSpans);
 
         wTerms[1] = new WeightedSpanTerm(1f, "kennedy");
-        positionSpans = new ArrayList<PositionSpan>();
+        positionSpans = new ArrayList<>();
         positionSpans.add(new PositionSpan(14, 14));
         wTerms[1].addPositionSpans(positionSpans);
 
@@ -1215,7 +1215,7 @@ public class HighlighterTest extends Bas
 
       @Override
       public void run() throws Exception {
-        HashMap<String,String> synonyms = new HashMap<String,String>();
+        HashMap<String,String> synonyms = new HashMap<>();
         synonyms.put("football", "soccer,footie");
         Analyzer analyzer = new SynonymAnalyzer(synonyms);
 
@@ -1577,7 +1577,7 @@ public class HighlighterTest extends Bas
       private final PositionIncrementAttribute posIncrAtt = addAttribute(PositionIncrementAttribute.class);
       private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
       {
-        lst = new ArrayList<Token>();
+        lst = new ArrayList<>();
         Token t;
         t = createToken("hi", 0, 2);
         t.setPositionIncrement(1);
@@ -1628,7 +1628,7 @@ public class HighlighterTest extends Bas
       private final PositionIncrementAttribute posIncrAtt = addAttribute(PositionIncrementAttribute.class);
       private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
       {
-        lst = new ArrayList<Token>();
+        lst = new ArrayList<>();
         Token t;
         t = createToken("hispeed", 0, 8);
         t.setPositionIncrement(1);

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java Wed Mar 12 18:14:05 2014
@@ -511,7 +511,7 @@ public class TestMultiTermHighlighting e
         return analyzer;
       }
     };
-    Query query = new SpanMultiTermQueryWrapper<WildcardQuery>(new WildcardQuery(new Term("body", "te*")));
+    Query query = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("body", "te*")));
     TopDocs topDocs = searcher.search(query, null, 10, Sort.INDEXORDER);
     assertEquals(2, topDocs.totalHits);
     String snippets[] = highlighter.highlight("body", query, searcher, topDocs);
@@ -552,7 +552,7 @@ public class TestMultiTermHighlighting e
         return analyzer;
       }
     };
-    SpanQuery childQuery = new SpanMultiTermQueryWrapper<WildcardQuery>(new WildcardQuery(new Term("body", "te*")));
+    SpanQuery childQuery = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("body", "te*")));
     Query query = new SpanOrQuery(new SpanQuery[] { childQuery });
     TopDocs topDocs = searcher.search(query, null, 10, Sort.INDEXORDER);
     assertEquals(2, topDocs.totalHits);
@@ -594,7 +594,7 @@ public class TestMultiTermHighlighting e
         return analyzer;
       }
     };
-    SpanQuery childQuery = new SpanMultiTermQueryWrapper<WildcardQuery>(new WildcardQuery(new Term("body", "te*")));
+    SpanQuery childQuery = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("body", "te*")));
     Query query = new SpanNearQuery(new SpanQuery[] { childQuery }, 0, true);
     TopDocs topDocs = searcher.search(query, null, 10, Sort.INDEXORDER);
     assertEquals(2, topDocs.totalHits);
@@ -636,7 +636,7 @@ public class TestMultiTermHighlighting e
         return analyzer;
       }
     };
-    SpanQuery include = new SpanMultiTermQueryWrapper<WildcardQuery>(new WildcardQuery(new Term("body", "te*")));
+    SpanQuery include = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("body", "te*")));
     SpanQuery exclude = new SpanTermQuery(new Term("body", "bogus"));
     Query query = new SpanNotQuery(include, exclude);
     TopDocs topDocs = searcher.search(query, null, 10, Sort.INDEXORDER);
@@ -679,7 +679,7 @@ public class TestMultiTermHighlighting e
         return analyzer;
       }
     };
-    SpanQuery childQuery = new SpanMultiTermQueryWrapper<WildcardQuery>(new WildcardQuery(new Term("body", "te*")));
+    SpanQuery childQuery = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("body", "te*")));
     Query query = new SpanFirstQuery(childQuery, 1000000);
     TopDocs topDocs = searcher.search(query, null, 10, Sort.INDEXORDER);
     assertEquals(2, topDocs.totalHits);

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestPostingsHighlighterRanking.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestPostingsHighlighterRanking.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestPostingsHighlighterRanking.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestPostingsHighlighterRanking.java Wed Mar 12 18:14:05 2014
@@ -163,7 +163,7 @@ public class TestPostingsHighlighterRank
    * instead it just collects them for asserts!
    */
   static class FakePassageFormatter extends PassageFormatter {
-    HashSet<Pair> seen = new HashSet<Pair>();
+    HashSet<Pair> seen = new HashSet<>();
     
     @Override
     public String format(Passage passages[], String content) {

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java Wed Mar 12 18:14:05 2014
@@ -169,7 +169,7 @@ public abstract class AbstractTestCase e
   }
 
   protected List<BytesRef> analyze(String text, String field, Analyzer analyzer) throws IOException {
-    List<BytesRef> bytesRefs = new ArrayList<BytesRef>();
+    List<BytesRef> bytesRefs = new ArrayList<>();
 
     TokenStream tokenStream = analyzer.tokenStream(field, text);
     try {

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FastVectorHighlighterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FastVectorHighlighterTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FastVectorHighlighterTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FastVectorHighlighterTest.java Wed Mar 12 18:14:05 2014
@@ -533,7 +533,7 @@ public class FastVectorHighlighterTest e
           token( "red", 0, 0, 3 )
         ), matched ) );
 
-    final Map<String, Analyzer> fieldAnalyzers = new TreeMap<String, Analyzer>();
+    final Map<String, Analyzer> fieldAnalyzers = new TreeMap<>();
     fieldAnalyzers.put( "field", new MockAnalyzer( random(), MockTokenizer.WHITESPACE, true, MockTokenFilter.ENGLISH_STOPSET ) );
     fieldAnalyzers.put( "field_exact", new MockAnalyzer( random() ) );
     fieldAnalyzers.put( "field_super_exact", new MockAnalyzer( random(), MockTokenizer.WHITESPACE, false ) );
@@ -566,7 +566,7 @@ public class FastVectorHighlighterTest e
     FieldQuery fieldQuery = new FieldQuery( query, reader, true, fieldMatch );
     String[] bestFragments;
     if ( useMatchedFields ) {
-      Set< String > matchedFields = new HashSet< String >();
+      Set< String > matchedFields = new HashSet<>();
       matchedFields.add( "field" );
       matchedFields.add( "field_exact" );
       matchedFields.add( "field_super_exact" );

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldPhraseListTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldPhraseListTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldPhraseListTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldPhraseListTest.java Wed Mar 12 18:14:05 2014
@@ -269,7 +269,7 @@ public class FieldPhraseListTest extends
   }
 
   private WeightedPhraseInfo newInfo( int startOffset, int endOffset, float boost ) {
-    LinkedList< TermInfo > infos = new LinkedList< TermInfo >();
+    LinkedList< TermInfo > infos = new LinkedList<>();
     infos.add( new TermInfo( TestUtil.randomUnicodeString(random()), startOffset, endOffset, 0, 0 ) );
     return new WeightedPhraseInfo( infos, boost );
   }

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldQueryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldQueryTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldQueryTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/FieldQueryTest.java Wed Mar 12 18:14:05 2014
@@ -67,7 +67,7 @@ public class FieldQueryTest extends Abst
     booleanQuery.add(innerQuery, Occur.MUST_NOT);
 
     FieldQuery fq = new FieldQuery(booleanQuery, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten(booleanQuery, reader, flatQueries);
     assertCollectionQueries( flatQueries, tq( boost, "A" ), tq( boost, "B" ), tq( boost, "C" ) );
   }
@@ -77,7 +77,7 @@ public class FieldQueryTest extends Abst
     Query query = dmq( tq( "A" ), tq( "B" ), pqF( "C", "D" ) );
     query.setBoost( boost );
     FieldQuery fq = new FieldQuery( query, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten( query, reader, flatQueries );
     assertCollectionQueries( flatQueries, tq( boost, "A" ), tq( boost, "B" ), pqF( boost, "C", "D" ) );
   }
@@ -90,7 +90,7 @@ public class FieldQueryTest extends Abst
     booleanQuery.add(pqF("B", "C"), Occur.MUST);
 
     FieldQuery fq = new FieldQuery(booleanQuery, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten(booleanQuery, reader, flatQueries);
     assertCollectionQueries( flatQueries, tq( boost, "A" ), pqF( boost, "B", "C" ) );
   }
@@ -102,7 +102,7 @@ public class FieldQueryTest extends Abst
     query.add(toPhraseQuery(analyze("EFGH", F, analyzerB), F), Occur.SHOULD);
 
     FieldQuery fq = new FieldQuery( query, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten( query, reader, flatQueries );
     assertCollectionQueries( flatQueries, tq( "AA" ), pqF( "BC", "CD" ), pqF( "EF", "FG", "GH" ) );
   }
@@ -110,7 +110,7 @@ public class FieldQueryTest extends Abst
   public void testFlatten1TermPhrase() throws Exception {
     Query query = pqF( "A" );
     FieldQuery fq = new FieldQuery( query, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten( query, reader, flatQueries );
     assertCollectionQueries( flatQueries, tq( "A" ) );
   }
@@ -120,56 +120,56 @@ public class FieldQueryTest extends Abst
     FieldQuery fq = new FieldQuery( dummy, true, true );
 
     // "a b","b c" => "a b","b c","a b c"
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( pqF( "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b" ), pqF( "b", "c" ), pqF( "a", "b", "c" ) );
 
     // "a b","b c d" => "a b","b c d","a b c d"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( pqF( "b", "c", "d" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b" ), pqF( "b", "c", "d" ), pqF( "a", "b", "c", "d" ) );
 
     // "a b c","b c d" => "a b c","b c d","a b c d"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b", "c" ) );
     flatQueries.add( pqF( "b", "c", "d" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b", "c" ), pqF( "b", "c", "d" ), pqF( "a", "b", "c", "d" ) );
 
     // "a b c","c d e" => "a b c","c d e","a b c d e"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b", "c" ) );
     flatQueries.add( pqF( "c", "d", "e" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b", "c" ), pqF( "c", "d", "e" ), pqF( "a", "b", "c", "d", "e" ) );
 
     // "a b c d","b c" => "a b c d","b c"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b", "c", "d" ) );
     flatQueries.add( pqF( "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b", "c", "d" ), pqF( "b", "c" ) );
 
     // "a b b","b c" => "a b b","b c","a b b c"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b", "b" ) );
     flatQueries.add( pqF( "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b", "b" ), pqF( "b", "c" ), pqF( "a", "b", "b", "c" ) );
 
     // "a b","b a" => "a b","b a","a b a", "b a b"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( pqF( "b", "a" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b" ), pqF( "b", "a" ), pqF( "a", "b", "a" ), pqF( "b", "a", "b" ) );
 
     // "a b","a b c" => "a b","a b c"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( pqF( "a", "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
@@ -181,42 +181,42 @@ public class FieldQueryTest extends Abst
     FieldQuery fq = new FieldQuery( dummy, true, true );
 
     // "a b","c d" => "a b","c d"
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( pqF( "c", "d" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b" ), pqF( "c", "d" ) );
 
     // "a","a b" => "a", "a b"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( tq( "a" ) );
     flatQueries.add( pqF( "a", "b" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         tq( "a" ), pqF( "a", "b" ) );
 
     // "a b","b" => "a b", "b"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( tq( "b" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b" ), tq( "b" ) );
 
     // "a b c","b c" => "a b c","b c"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b", "c" ) );
     flatQueries.add( pqF( "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b", "c" ), pqF( "b", "c" ) );
 
     // "a b","a b c" => "a b","a b c"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b" ) );
     flatQueries.add( pqF( "a", "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
         pqF( "a", "b" ), pqF( "a", "b", "c" ) );
 
     // "a b c","b d e" => "a b c","b d e"
-    flatQueries = new HashSet<Query>();
+    flatQueries = new HashSet<>();
     flatQueries.add( pqF( "a", "b", "c" ) );
     flatQueries.add( pqF( "b", "d", "e" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
@@ -228,7 +228,7 @@ public class FieldQueryTest extends Abst
     FieldQuery fq = new FieldQuery( dummy, true, false );
 
     // f1:"a b",f2:"b c" => f1:"a b",f2:"b c",f1:"a b c"
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     flatQueries.add( pq( F1, "a", "b" ) );
     flatQueries.add( pq( F2, "b", "c" ) );
     assertCollectionQueries( fq.expand( flatQueries ),
@@ -826,7 +826,7 @@ public class FieldQueryTest extends Abst
     FieldQuery fq = new FieldQuery( query, true, true );
     
     // "a"
-    List<TermInfo> phraseCandidate = new ArrayList<TermInfo>();
+    List<TermInfo> phraseCandidate = new ArrayList<>();
     phraseCandidate.add( new TermInfo( "a", 0, 1, 0, 1 ) );
     assertNull( fq.searchPhrase( F, phraseCandidate ) );
     // "a b"
@@ -868,7 +868,7 @@ public class FieldQueryTest extends Abst
     FieldQuery fq = new FieldQuery( query, true, true );
     
     // "a b c" w/ position-gap = 2
-    List<TermInfo> phraseCandidate = new ArrayList<TermInfo>();
+    List<TermInfo> phraseCandidate = new ArrayList<>();
     phraseCandidate.add( new TermInfo( "a", 0, 1, 0, 1 ) );
     phraseCandidate.add( new TermInfo( "b", 2, 3, 2, 1 ) );
     phraseCandidate.add( new TermInfo( "c", 4, 5, 4, 1 ) );
@@ -917,7 +917,7 @@ public class FieldQueryTest extends Abst
     QueryPhraseMap qpm = fq.getFieldTermMap(F, "defg");
     assertNotNull (qpm);
     assertNull (fq.getFieldTermMap(F, "dog"));
-    List<TermInfo> phraseCandidate = new ArrayList<TermInfo>();
+    List<TermInfo> phraseCandidate = new ArrayList<>();
     phraseCandidate.add( new TermInfo( "defg", 0, 12, 0, 1 ) );
     assertNotNull (fq.searchPhrase(F, phraseCandidate));
   }
@@ -947,7 +947,7 @@ public class FieldQueryTest extends Abst
     });
     query.setBoost(boost);
     FieldQuery fq = new FieldQuery( query, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten( query, reader, flatQueries );
     assertCollectionQueries( flatQueries, tq( boost, "A" ) );
   }
@@ -957,7 +957,7 @@ public class FieldQueryTest extends Abst
     Query query = new ConstantScoreQuery(pqF( "A" ));
     query.setBoost(boost);
     FieldQuery fq = new FieldQuery( query, true, true );
-    Set<Query> flatQueries = new HashSet<Query>();
+    Set<Query> flatQueries = new HashSet<>();
     fq.flatten( query, reader, flatQueries );
     assertCollectionQueries( flatQueries, tq( boost, "A" ) );
   }

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java Wed Mar 12 18:14:05 2014
@@ -48,7 +48,7 @@ public class IndexTimeSynonymTest extend
     FieldQuery fq = new FieldQuery( bq, true, true );
     FieldTermStack stack = new FieldTermStack( reader, 0, F, fq );
     assertEquals( 2, stack.termList.size() );
-    Set<String> expectedSet = new HashSet<String>();
+    Set<String> expectedSet = new HashSet<>();
     expectedSet.add( "Mac(11,20,3)" );
     expectedSet.add( "MacBook(11,20,3)" );
     assertTrue( expectedSet.contains( stack.pop().toString() ) );
@@ -92,7 +92,7 @@ public class IndexTimeSynonymTest extend
     FieldQuery fq = new FieldQuery( bq, true, true );
     FieldTermStack stack = new FieldTermStack( reader, 0, F, fq );
     assertEquals( 3, stack.termList.size() );
-    Set<String> expectedSet = new HashSet<String>();
+    Set<String> expectedSet = new HashSet<>();
     expectedSet.add( "pc(3,5,1)" );
     expectedSet.add( "personal(3,5,1)" );
     assertTrue( expectedSet.contains( stack.pop().toString() ) );
@@ -137,7 +137,7 @@ public class IndexTimeSynonymTest extend
     FieldQuery fq = new FieldQuery( bq, true, true );
     FieldTermStack stack = new FieldTermStack( reader, 0, F, fq );
     assertEquals( 3, stack.termList.size() );
-    Set<String> expectedSet = new HashSet<String>();
+    Set<String> expectedSet = new HashSet<>();
     expectedSet.add( "pc(3,20,1)" );
     expectedSet.add( "personal(3,20,1)" );
     assertTrue( expectedSet.contains( stack.pop().toString() ) );

Modified: lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilderTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilderTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilderTest.java Wed Mar 12 18:14:05 2014
@@ -248,9 +248,9 @@ public class SimpleFragmentsBuilderTest 
     int numDocs = randomValues.length * 5;
     int numFields = 2 + random().nextInt(5);
     int numTerms = 2 + random().nextInt(3);
-    List<Doc> docs = new ArrayList<Doc>(numDocs);
-    List<Document> documents = new ArrayList<Document>(numDocs);
-    Map<String, Set<Integer>> valueToDocId = new HashMap<String, Set<Integer>>();
+    List<Doc> docs = new ArrayList<>(numDocs);
+    List<Document> documents = new ArrayList<>(numDocs);
+    Map<String, Set<Integer>> valueToDocId = new HashMap<>();
     for (int i = 0; i < numDocs; i++) {
       Document document = new Document();
       String[][] fields = new String[numFields][numTerms];
@@ -277,7 +277,7 @@ public class SimpleFragmentsBuilderTest 
       for (int highlightIter = 0; highlightIter < highlightIters; highlightIter++) {
         String queryTerm = randomValues[random().nextInt(randomValues.length)];
         int randomHit = valueToDocId.get(queryTerm).iterator().next();
-        List<StringBuilder> builders = new ArrayList<StringBuilder>();
+        List<StringBuilder> builders = new ArrayList<>();
         for (String[] fieldValues : docs.get(randomHit).fieldValues) {
           StringBuilder builder = new StringBuilder();
           boolean hit = false;

Modified: lucene/dev/branches/branch_4x/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java (original)
+++ lucene/dev/branches/branch_4x/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java Wed Mar 12 18:14:05 2014
@@ -80,7 +80,7 @@ public class ToParentBlockJoinCollector 
 
   // Maps each BlockJoinQuery instance to its "slot" in
   // joinScorers and in OneGroup's cached doc/scores/count:
-  private final Map<Query,Integer> joinQueryID = new HashMap<Query,Integer>();
+  private final Map<Query,Integer> joinQueryID = new HashMap<>();
   private final int numParentHits;
   private final FieldValueHitQueue<OneGroup> queue;
   private final FieldComparator[] comparators;
@@ -309,7 +309,7 @@ public class ToParentBlockJoinCollector 
     }
     Arrays.fill(joinScorers, null);
 
-    Queue<Scorer> queue = new LinkedList<Scorer>();
+    Queue<Scorer> queue = new LinkedList<>();
     //System.out.println("\nqueue: add top scorer=" + scorer);
     queue.add(scorer);
     while ((scorer = queue.poll()) != null) {
@@ -446,7 +446,7 @@ public class ToParentBlockJoinCollector 
 
       final TopDocs topDocs = collector.topDocs(withinGroupOffset, numDocsInGroup);
 
-      groups[groupIDX-offset] = new GroupDocs<Integer>(og.score,
+      groups[groupIDX-offset] = new GroupDocs<>(og.score,
                                                        topDocs.getMaxScore(),
                                                        numChildDocs,
                                                        topDocs.scoreDocs,
@@ -454,7 +454,7 @@ public class ToParentBlockJoinCollector 
                                                        groupSortValues);
     }
 
-    return new TopGroups<Integer>(new TopGroups<Integer>(sort.getSort(),
+    return new TopGroups<>(new TopGroups<>(sort.getSort(),
                                                          withinGroupSort == null ? null : withinGroupSort.getSort(),
                                                          0, totalGroupedHitCount, groups, maxScore),
                                   totalHitCount);

Modified: lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java (original)
+++ lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java Wed Mar 12 18:14:05 2014
@@ -69,7 +69,7 @@ public class TestBlockJoin extends Lucen
     // we don't want to merge - since we rely on certain segment setup
     final IndexWriter w = new IndexWriter(dir, config);
 
-    final List<Document> docs = new ArrayList<Document>();
+    final List<Document> docs = new ArrayList<>();
 
     docs.add(makeJob("java", 2007));
     docs.add(makeJob("python", 2010));
@@ -127,7 +127,7 @@ public class TestBlockJoin extends Lucen
     final Directory dir = newDirectory();
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
 
-    final List<Document> docs = new ArrayList<Document>();
+    final List<Document> docs = new ArrayList<>();
 
     docs.add(makeJob("java", 2007));
     docs.add(makeJob("python", 2010));
@@ -217,7 +217,7 @@ public class TestBlockJoin extends Lucen
     final Directory dir = newDirectory();
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
 
-    final List<Document> docs = new ArrayList<Document>();
+    final List<Document> docs = new ArrayList<>();
 
     for (int i=0;i<10;i++) {
       docs.clear();
@@ -270,13 +270,13 @@ public class TestBlockJoin extends Lucen
     final Directory dir = newDirectory();
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
 
-    final List<Document> docs = new ArrayList<Document>();
+    final List<Document> docs = new ArrayList<>();
     docs.add(makeJob("java", 2007));
     docs.add(makeJob("python", 2010));
     Collections.shuffle(docs, random());
     docs.add(makeResume("Lisa", "United Kingdom"));
 
-    final List<Document> docs2 = new ArrayList<Document>();
+    final List<Document> docs2 = new ArrayList<>();
     docs2.add(makeJob("ruby", 2005));
     docs2.add(makeJob("java", 2006));
     Collections.shuffle(docs2, random());
@@ -392,7 +392,7 @@ public class TestBlockJoin extends Lucen
     // Cannot assert this since we use NoMergePolicy:
     w.setDoRandomForceMergeAssert(false);
 
-    List<Document> docs = new ArrayList<Document>();
+    List<Document> docs = new ArrayList<>();
     docs.add(makeJob("java", 2007));
     docs.add(makeJob("python", 2010));
     docs.add(makeResume("Lisa", "United Kingdom"));
@@ -467,7 +467,7 @@ public class TestBlockJoin extends Lucen
   }
 
   private Sort getRandomSort(String prefix, int numFields) {
-    final List<SortField> sortFields = new ArrayList<SortField>();
+    final List<SortField> sortFields = new ArrayList<>();
     // TODO: sometimes sort by score; problem is scores are
     // not comparable across the two indices
     // sortFields.add(SortField.FIELD_SCORE);
@@ -499,7 +499,7 @@ public class TestBlockJoin extends Lucen
     final String[][] childFields = getRandomFields(numParentDocs);
 
     final boolean doDeletes = random().nextBoolean();
-    final List<Integer> toDelete = new ArrayList<Integer>();
+    final List<Integer> toDelete = new ArrayList<>();
 
     // TODO: parallel star join, nested join cases too!
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
@@ -524,7 +524,7 @@ public class TestBlockJoin extends Lucen
         parentJoinDoc.add(newStringField("blockID", ""+parentDocID, Field.Store.NO));
       }
 
-      final List<Document> joinDocs = new ArrayList<Document>();
+      final List<Document> joinDocs = new ArrayList<>();
 
       if (VERBOSE) {
         StringBuilder sb = new StringBuilder();
@@ -717,7 +717,7 @@ public class TestBlockJoin extends Lucen
       }
 
       // Merge both sorts:
-      final List<SortField> sortFields = new ArrayList<SortField>(Arrays.asList(parentSort.getSort()));
+      final List<SortField> sortFields = new ArrayList<>(Arrays.asList(parentSort.getSort()));
       sortFields.addAll(Arrays.asList(childSort.getSort()));
       final Sort parentAndChildSort = new Sort(sortFields.toArray(new SortField[sortFields.size()]));
 
@@ -1024,7 +1024,7 @@ public class TestBlockJoin extends Lucen
     final Directory dir = newDirectory();
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
 
-    final List<Document> docs = new ArrayList<Document>();
+    final List<Document> docs = new ArrayList<>();
 
     docs.add(makeJob("java", 2007));
     docs.add(makeJob("python", 2010));
@@ -1168,7 +1168,7 @@ public class TestBlockJoin extends Lucen
     final Directory dir = newDirectory();
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
 
-    final List<Document> docs = new ArrayList<Document>();
+    final List<Document> docs = new ArrayList<>();
     docs.add(makeJob("ruby", 2005));
     docs.add(makeJob("java", 2006));
     docs.add(makeJob("java", 2010));
@@ -1262,7 +1262,7 @@ public class TestBlockJoin extends Lucen
     parent.add(newTextField("parentText", "text", Field.Store.NO));
     parent.add(newStringField("isParent", "yes", Field.Store.NO));
 
-    List<Document> docs = new ArrayList<Document>();
+    List<Document> docs = new ArrayList<>();
 
     Document child = new Document();
     docs.add(child);
@@ -1326,7 +1326,7 @@ public class TestBlockJoin extends Lucen
     parent.add(newTextField("parentText", "text", Field.Store.NO));
     parent.add(newStringField("isParent", "yes", Field.Store.NO));
 
-    List<Document> docs = new ArrayList<Document>();
+    List<Document> docs = new ArrayList<>();
 
     Document child = new Document();
     docs.add(child);
@@ -1391,7 +1391,7 @@ public class TestBlockJoin extends Lucen
     parent.add(newTextField("parentText", "text", Field.Store.NO));
     parent.add(newStringField("isParent", "yes", Field.Store.NO));
 
-    List<Document> docs = new ArrayList<Document>();
+    List<Document> docs = new ArrayList<>();
 
     Document child = new Document();
     docs.add(child);

Modified: lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSorting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSorting.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSorting.java (original)
+++ lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSorting.java Wed Mar 12 18:14:05 2014
@@ -55,7 +55,7 @@ public class TestBlockJoinSorting extend
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT,
         new MockAnalyzer(random())).setMergePolicy(NoMergePolicy.COMPOUND_FILES));
 
-    List<Document> docs = new ArrayList<Document>();
+    List<Document> docs = new ArrayList<>();
     Document document = new Document();
     document.add(new StringField("field2", "a", Field.Store.NO));
     document.add(new StringField("filter_1", "T", Field.Store.NO));

Modified: lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinValidation.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinValidation.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinValidation.java (original)
+++ lucene/dev/branches/branch_4x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinValidation.java Wed Mar 12 18:14:05 2014
@@ -140,11 +140,11 @@ public class TestBlockJoinValidation ext
   }
 
   private static List<Document> createDocsForSegment(int segmentNumber) {
-    List<List<Document>> blocks = new ArrayList<List<Document>>(AMOUNT_OF_PARENT_DOCS);
+    List<List<Document>> blocks = new ArrayList<>(AMOUNT_OF_PARENT_DOCS);
     for (int i = 0; i < AMOUNT_OF_PARENT_DOCS; i++) {
       blocks.add(createParentDocWithChildren(segmentNumber, i));
     }
-    List<Document> result = new ArrayList<Document>(AMOUNT_OF_DOCS_IN_SEGMENT);
+    List<Document> result = new ArrayList<>(AMOUNT_OF_DOCS_IN_SEGMENT);
     for (List<Document> block : blocks) {
       result.addAll(block);
     }
@@ -152,7 +152,7 @@ public class TestBlockJoinValidation ext
   }
 
   private static List<Document> createParentDocWithChildren(int segmentNumber, int parentNumber) {
-    List<Document> result = new ArrayList<Document>(AMOUNT_OF_CHILD_DOCS + 1);
+    List<Document> result = new ArrayList<>(AMOUNT_OF_CHILD_DOCS + 1);
     for (int i = 0; i < AMOUNT_OF_CHILD_DOCS; i++) {
       result.add(createChildDoc(segmentNumber, parentNumber, i));
     }



Mime
View raw message