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 15:39:39 UTC

svn commit: r1576755 [25/27] - in /lucene/dev/trunk: lucene/ lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/ lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/ lucene/analysis/common/src/java/org/apache/lucene/a...

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java Wed Mar 12 14:39:17 2014
@@ -77,7 +77,7 @@ public class TestSearchPerf extends Abst
 
   // Skip encoding for updating the index
   void createIndex2(int nDocs, String... fields) throws IOException {
-    Set<String> fieldSet = new HashSet<String>(Arrays.asList(fields));
+    Set<String> fieldSet = new HashSet<>(Arrays.asList(fields));
 
     SolrQueryRequest req = lrf.makeRequest();
     SolrQueryResponse rsp = new SolrQueryResponse();
@@ -233,7 +233,7 @@ public class TestSearchPerf extends Abst
 
     QParser parser = QParser.getParser("foomany_s:[" + l + " TO " + u + "]", null, req);
     Query rangeQ = parser.getQuery();
-    List<Query> filters = new ArrayList<Query>();
+    List<Query> filters = new ArrayList<>();
     filters.add(rangeQ);
     req.close();
 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSort.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSort.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestSort.java Wed Mar 12 14:39:17 2014
@@ -237,7 +237,7 @@ public class TestSort extends SolrTestCa
         final boolean sortMissingLast = !luceneSort && r.nextBoolean();
         final boolean sortMissingFirst = !luceneSort && !sortMissingLast;
         final boolean reverse = r.nextBoolean();
-        List<SortField> sfields = new ArrayList<SortField>();
+        List<SortField> sfields = new ArrayList<>();
 
         final boolean secondary = r.nextBoolean();
         final boolean luceneSort2 = r.nextBoolean();
@@ -263,7 +263,7 @@ public class TestSort extends SolrTestCa
         boolean scoreInOrder = r.nextBoolean();
         final TopFieldCollector topCollector = TopFieldCollector.create(sort, top, true, trackScores, trackMaxScores, scoreInOrder);
 
-        final List<MyDoc> collectedDocs = new ArrayList<MyDoc>();
+        final List<MyDoc> collectedDocs = new ArrayList<>();
         // delegate and collect docs ourselves
         Collector myCollector = new Collector() {
           int docBase;

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java Wed Mar 12 14:39:17 2014
@@ -50,9 +50,9 @@ public class TestStandardQParsers extend
   public void testRegisteredName() throws Exception {
     Map<String, Class<QParserPlugin>> standardPlugins = getStandardQParsers();
 
-    List<String> notStatic = new ArrayList<String>(standardPlugins.size());
-    List<String> notFinal = new ArrayList<String>(standardPlugins.size());
-    List<String> mismatch = new ArrayList<String>(standardPlugins.size());
+    List<String> notStatic = new ArrayList<>(standardPlugins.size());
+    List<String> notFinal = new ArrayList<>(standardPlugins.size());
+    List<String> mismatch = new ArrayList<>(standardPlugins.size());
  
     for (Map.Entry<String,Class<QParserPlugin>> pair : standardPlugins.entrySet()) {
       String regName = pair.getKey();
@@ -93,7 +93,7 @@ public class TestStandardQParsers extend
     Object[] standardPluginsValue = QParserPlugin.standardPlugins;
 
     Map<String, Class<QParserPlugin>> standardPlugins 
-      = new HashMap<String, Class<QParserPlugin>>(standardPluginsValue.length / 2);
+      = new HashMap<>(standardPluginsValue.length / 2);
 
     for (int i = 0; i < standardPluginsValue.length; i += 2) {
       @SuppressWarnings("unchecked")

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressLucene.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressLucene.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressLucene.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressLucene.java Wed Mar 12 14:39:17 2014
@@ -79,7 +79,7 @@ public class TestStressLucene extends Te
 
     final AtomicInteger numCommitting = new AtomicInteger();
 
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
 
     final FieldType idFt = new FieldType();
@@ -143,7 +143,7 @@ public class TestStressLucene extends Te
                   if (reopenLock != null) reopenLock.lock();
 
                   synchronized(globalLock) {
-                    newCommittedModel = new HashMap<Integer,DocInfo>(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/trunk/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java Wed Mar 12 14:39:17 2014
@@ -82,7 +82,7 @@ public class TestStressRecovery extends 
 
     final AtomicInteger numCommitting = new AtomicInteger();
 
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
 
     final AtomicLong testVersion = new AtomicLong(0);
@@ -119,7 +119,7 @@ public class TestStressRecovery extends 
                   long version;
 
                   synchronized(globalLock) {
-                    newCommittedModel = new HashMap<Integer,DocInfo>(model);  // take a snapshot
+                    newCommittedModel = new HashMap<>(model);  // take a snapshot
                     version = snapshotCount++;
                   }
 
@@ -348,7 +348,7 @@ public class TestStressRecovery extends 
       // before we start buffering updates, we want to point
       // visibleModel away from the live model.
 
-      visibleModel = new ConcurrentHashMap<Integer, DocInfo>(model);
+      visibleModel = new ConcurrentHashMap<>(model);
 
       synchronized (stateChangeLock) {
         uLog.bufferUpdates();

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressReorder.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressReorder.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressReorder.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressReorder.java Wed Mar 12 14:39:17 2014
@@ -99,7 +99,7 @@ public class TestStressReorder extends T
 
     final AtomicInteger numCommitting = new AtomicInteger();
 
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
 
     final AtomicLong testVersion = new AtomicLong(0);
@@ -120,7 +120,7 @@ public class TestStressReorder extends T
                 long version;
 
                 synchronized(TestStressReorder.this) {
-                  newCommittedModel = new HashMap<Integer,DocInfo>(model);  // take a snapshot
+                  newCommittedModel = new HashMap<>(model);  // take a snapshot
                   version = snapshotCount++;
                 }
 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java Wed Mar 12 14:39:17 2014
@@ -102,7 +102,7 @@ public class TestStressUserVersions exte
 
     final AtomicInteger numCommitting = new AtomicInteger();
 
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
 
     final AtomicLong testVersion = new AtomicLong(0);
@@ -123,7 +123,7 @@ public class TestStressUserVersions exte
                   long version;
 
                   synchronized(TestStressUserVersions.this) {
-                    newCommittedModel = new HashMap<Integer,DocInfo>(model);  // take a snapshot
+                    newCommittedModel = new HashMap<>(model);  // take a snapshot
                     version = snapshotCount++;
                   }
 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressVersions.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressVersions.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressVersions.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestStressVersions.java Wed Mar 12 14:39:17 2014
@@ -69,7 +69,7 @@ public class TestStressVersions extends 
 
     final AtomicInteger numCommitting = new AtomicInteger();
 
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
     for (int i=0; i<nWriteThreads; i++) {
       Thread thread = new Thread("WRITER"+i) {
@@ -87,7 +87,7 @@ public class TestStressVersions extends 
                   long version;
 
                   synchronized(globalLock) {
-                    newCommittedModel = new HashMap<Integer,DocInfo>(model);  // take a snapshot
+                    newCommittedModel = new HashMap<>(model);  // take a snapshot
                     version = snapshotCount++;
                   }
 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java Wed Mar 12 14:39:17 2014
@@ -103,7 +103,7 @@ public class TestFunctionQuery extends S
   void singleTest(String field, String funcTemplate, List<String> args, float... results) {
     String parseableQuery = func(field, funcTemplate);
 
-    List<String> nargs = new ArrayList<String>(Arrays.asList("q", parseableQuery
+    List<String> nargs = new ArrayList<>(Arrays.asList("q", parseableQuery
             ,"fl", "*,score"
             ,"indent","on"
             ,"rows","100"));
@@ -114,7 +114,7 @@ public class TestFunctionQuery extends S
       }
     }
 
-    List<String> tests = new ArrayList<String>();
+    List<String> tests = new ArrayList<>();
 
     // Construct xpaths like the following:
     // "//doc[./float[@name='foo_pf']='10.0' and ./float[@name='score']='10.0']"

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java Wed Mar 12 14:39:17 2014
@@ -81,7 +81,7 @@ public class BJQParserTest extends SolrT
 
   private static int id=0;
   private static List<List<String[]>> createBlocks() {
-    List<List<String[]>> blocks = new ArrayList<List<String[]>>();
+    List<List<String[]>> blocks = new ArrayList<>();
     for (String parent : abcdef) {
       List<String[]> block = createChildrenBlock(parent);
       block.add(new String[] {"parent_s", parent});
@@ -92,7 +92,7 @@ public class BJQParserTest extends SolrT
   }
 
   private static List<String[]> createChildrenBlock(String parent) {
-    List<String[]> block = new ArrayList<String[]>();
+    List<String[]> block = new ArrayList<>();
     for (String child : klm) {
       block
           .add(new String[] {"child_s", child, "parentchild_s", parent + child});
@@ -103,7 +103,7 @@ public class BJQParserTest extends SolrT
   }
   
   private static void addGrandChildren(List<String[]> block) {
-    List<String> grandChildren = new ArrayList<String>(xyz);
+    List<String> grandChildren = new ArrayList<>(xyz);
     // add grandchildren after children
     for (ListIterator<String[]> iter = block.listIterator(); iter.hasNext();) {
       String[] child = iter.next();

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java Wed Mar 12 14:39:17 2014
@@ -39,7 +39,7 @@ public abstract class CacheHeaderTestBas
     HttpSolrServer httpserver = (HttpSolrServer)getSolrServer();
     HttpRequestBase m = null;
     
-    ArrayList<BasicNameValuePair> qparams = new ArrayList<BasicNameValuePair>();
+    ArrayList<BasicNameValuePair> qparams = new ArrayList<>();
     if(params.length==0) {
       qparams.add(new BasicNameValuePair("q", "solr"));
       qparams.add(new BasicNameValuePair("qt", "standard"));
@@ -66,7 +66,7 @@ public abstract class CacheHeaderTestBas
     HttpSolrServer httpserver = (HttpSolrServer)getSolrServer();
     HttpRequestBase m = null;
     
-    ArrayList<BasicNameValuePair> qparams = new ArrayList<BasicNameValuePair>();
+    ArrayList<BasicNameValuePair> qparams = new ArrayList<>();
     for(int i=0;i<params.length/2;i++) {
       qparams.add(new BasicNameValuePair(params[i*2], params[i*2+1]));
     }

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java Wed Mar 12 14:39:17 2014
@@ -76,23 +76,23 @@ public class SolrRequestParserTest exten
     
     SolrCore core = h.getCore();
     
-    Map<String,String[]> args = new HashMap<String, String[]>();
+    Map<String,String[]> args = new HashMap<>();
     args.put( CommonParams.STREAM_BODY, new String[] {body1} );
     
     // Make sure it got a single stream in and out ok
-    List<ContentStream> streams = new ArrayList<ContentStream>();
+    List<ContentStream> streams = new ArrayList<>();
     SolrQueryRequest req = parser.buildRequestFrom( core, new MultiMapSolrParams( args ), streams );
     assertEquals( 1, streams.size() );
     assertEquals( body1, IOUtils.toString( streams.get(0).getReader() ) );
     req.close();
 
     // Now add three and make sure they come out ok
-    streams = new ArrayList<ContentStream>();
+    streams = new ArrayList<>();
     args.put( CommonParams.STREAM_BODY, new String[] {body1,body2,body3} );
     req = parser.buildRequestFrom( core, new MultiMapSolrParams( args ), streams );
     assertEquals( 3, streams.size() );
-    ArrayList<String> input  = new ArrayList<String>();
-    ArrayList<String> output = new ArrayList<String>();
+    ArrayList<String> input  = new ArrayList<>();
+    ArrayList<String> output = new ArrayList<>();
     input.add( body1 );
     input.add( body2 );
     input.add( body3 );
@@ -107,7 +107,7 @@ public class SolrRequestParserTest exten
 
     // set the contentType and make sure tat gets set
     String ctype = "text/xxx";
-    streams = new ArrayList<ContentStream>();
+    streams = new ArrayList<>();
     args.put( CommonParams.STREAM_CONTENTTYPE, new String[] {ctype} );
     req = parser.buildRequestFrom( core, new MultiMapSolrParams( args ), streams );
     for( ContentStream s : streams ) {
@@ -138,11 +138,11 @@ public class SolrRequestParserTest exten
 
     SolrCore core = h.getCore();
     
-    Map<String,String[]> args = new HashMap<String, String[]>();
+    Map<String,String[]> args = new HashMap<>();
     args.put( CommonParams.STREAM_URL, new String[] {url} );
     
     // Make sure it got a single stream in and out ok
-    List<ContentStream> streams = new ArrayList<ContentStream>();
+    List<ContentStream> streams = new ArrayList<>();
     SolrQueryRequest req = parser.buildRequestFrom( core, new MultiMapSolrParams( args ), streams );
     assertEquals( 1, streams.size() );
     try {
@@ -358,11 +358,11 @@ public class SolrRequestParserTest exten
     expect(request.getMethod()).andReturn("GET").anyTimes();
     expect(request.getContentType()).andReturn( "application/x-www-form-urlencoded" ).anyTimes();
     expect(request.getQueryString()).andReturn("q=title:solr").anyTimes();
-    Map<String, String> headers = new HashMap<String,String>();
+    Map<String, String> headers = new HashMap<>();
     headers.put("X-Forwarded-For", "10.0.0.1");
-    expect(request.getHeaderNames()).andReturn(new Vector<String>(headers.keySet()).elements()).anyTimes();
+    expect(request.getHeaderNames()).andReturn(new Vector<>(headers.keySet()).elements()).anyTimes();
     for(Map.Entry<String,String> entry:headers.entrySet()) {
-      Vector<String> v = new Vector<String>();
+      Vector<String> v = new Vector<>();
       v.add(entry.getValue());
       expect(request.getHeaders(entry.getKey())).andReturn(v.elements()).anyTimes();
     }

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java Wed Mar 12 14:39:17 2014
@@ -40,7 +40,7 @@ class SimpleQueryConverter extends Spell
 
   @Override
   public Collection<Token> convert(String origQuery) {
-    Collection<Token> result = new HashSet<Token>();
+    Collection<Token> result = new HashSet<>();
     WhitespaceAnalyzer analyzer = new WhitespaceAnalyzer(LuceneTestCase.TEST_VERSION_CURRENT);
     
     try (TokenStream ts = analyzer.tokenStream("", origQuery)) {

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java Wed Mar 12 14:39:17 2014
@@ -348,7 +348,7 @@ public class SpellCheckCollatorTest exte
     spellCheck = (NamedList) values.get("spellcheck");
     suggestions = (NamedList) spellCheck.get("suggestions");
     List<NamedList> expandedCollationList = suggestions.getAll("collation");
-    Set<String> usedcollations = new HashSet<String>();
+    Set<String> usedcollations = new HashSet<>();
     assertTrue(expandedCollationList.size() == 2);
     for (NamedList expandedCollation : expandedCollationList) {
       String multipleCollation = (String) expandedCollation.get("collationQuery");

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java Wed Mar 12 14:39:17 2014
@@ -43,7 +43,7 @@ public class SpellPossibilityIteratorTes
   public void setUp() throws Exception {
     super.setUp();
 
-    AYE = new LinkedHashMap<String, Integer>();
+    AYE = new LinkedHashMap<>();
     AYE.put("I", 0);
     AYE.put("II", 0);
     AYE.put("III", 0);
@@ -53,7 +53,7 @@ public class SpellPossibilityIteratorTes
     AYE.put("VII", 0);
     AYE.put("VIII", 0);
 
-    BEE = new LinkedHashMap<String, Integer>();
+    BEE = new LinkedHashMap<>();
     BEE.put("alpha", 0);
     BEE.put("beta", 0);
     BEE.put("gamma", 0);
@@ -64,7 +64,7 @@ public class SpellPossibilityIteratorTes
     BEE.put("theta", 0);
     BEE.put("iota", 0);
 
-    AYE_BEE = new LinkedHashMap<String, Integer>();
+    AYE_BEE = new LinkedHashMap<>();
     AYE_BEE.put("one-alpha", 0);
     AYE_BEE.put("two-beta", 0);
     AYE_BEE.put("three-gamma", 0);
@@ -76,7 +76,7 @@ public class SpellPossibilityIteratorTes
     AYE_BEE.put("nine-iota", 0);
 
 
-    CEE = new LinkedHashMap<String, Integer>();
+    CEE = new LinkedHashMap<>();
     CEE.put("one", 0);
     CEE.put("two", 0);
     CEE.put("three", 0);
@@ -91,7 +91,7 @@ public class SpellPossibilityIteratorTes
 
   @Test
   public void testScalability() throws Exception {
-    Map<Token, LinkedHashMap<String, Integer>> lotsaSuggestions = new LinkedHashMap<Token, LinkedHashMap<String, Integer>>();
+    Map<Token, LinkedHashMap<String, Integer>> lotsaSuggestions = new LinkedHashMap<>();
     lotsaSuggestions.put(TOKEN_AYE , AYE);
     lotsaSuggestions.put(TOKEN_BEE , BEE);
     lotsaSuggestions.put(TOKEN_CEE , CEE);
@@ -135,7 +135,7 @@ public class SpellPossibilityIteratorTes
 
   @Test
   public void testSpellPossibilityIterator() throws Exception {
-    Map<Token, LinkedHashMap<String, Integer>> suggestions = new LinkedHashMap<Token, LinkedHashMap<String, Integer>>();
+    Map<Token, LinkedHashMap<String, Integer>> suggestions = new LinkedHashMap<>();
     suggestions.put(TOKEN_AYE , AYE);
     suggestions.put(TOKEN_BEE , BEE);
     suggestions.put(TOKEN_CEE , CEE);
@@ -185,7 +185,7 @@ public class SpellPossibilityIteratorTes
 
   @Test
   public void testOverlappingTokens() throws Exception {
-    Map<Token, LinkedHashMap<String, Integer>> overlappingSuggestions = new LinkedHashMap<Token, LinkedHashMap<String, Integer>>();
+    Map<Token, LinkedHashMap<String, Integer>> overlappingSuggestions = new LinkedHashMap<>();
     overlappingSuggestions.put(TOKEN_AYE, AYE);
     overlappingSuggestions.put(TOKEN_BEE, BEE);
     overlappingSuggestions.put(TOKEN_AYE_BEE, AYE_BEE);
@@ -194,7 +194,7 @@ public class SpellPossibilityIteratorTes
     PossibilityIterator iter = new PossibilityIterator(overlappingSuggestions, Integer.MAX_VALUE, Integer.MAX_VALUE, true);
     int aCount = 0;
     int abCount = 0;
-    Set<PossibilityIterator.RankedSpellPossibility> dupChecker = new HashSet<PossibilityIterator.RankedSpellPossibility>();
+    Set<PossibilityIterator.RankedSpellPossibility> dupChecker = new HashSet<>();
     while (iter.hasNext()) {
       PossibilityIterator.RankedSpellPossibility rsp = iter.next();
       Token a = null;

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java Wed Mar 12 14:39:17 2014
@@ -136,49 +136,49 @@ public class SpellingQueryConverterTest 
     converter.setAnalyzer(new WhitespaceAnalyzer(TEST_VERSION_CURRENT));
 
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("aaa bbb ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("aaa bbb ccc"));
       assertTrue("Should have 3 tokens",          tokens != null && tokens.size()==3);
       assertTrue("token 1 should be optional",    !hasRequiredFlag(tokens.get(0)) && !hasProhibitedFlag(tokens.get(0)));
       assertTrue("token 2 should be optional",    !hasRequiredFlag(tokens.get(1)) && !hasProhibitedFlag(tokens.get(1)));
       assertTrue("token 3 should be optional",    !hasRequiredFlag(tokens.get(2)) && !hasProhibitedFlag(tokens.get(2)));
     }
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("+aaa bbb -ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("+aaa bbb -ccc"));
       assertTrue("Should have 3 tokens",          tokens != null && tokens.size()==3);
       assertTrue("token 1 should be required",     hasRequiredFlag(tokens.get(0)) && !hasProhibitedFlag(tokens.get(0)));
       assertTrue("token 2 should be optional",    !hasRequiredFlag(tokens.get(1)) && !hasProhibitedFlag(tokens.get(1)));
       assertTrue("token 3 should be prohibited",  !hasRequiredFlag(tokens.get(2)) &&  hasProhibitedFlag(tokens.get(2)));
     }
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("aaa AND bbb ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("aaa AND bbb ccc"));
       assertTrue("Should have 3 tokens",           tokens != null && tokens.size()==3);
       assertTrue("token 1 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(0)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 2 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(1)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 3 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(2)) && hasInBooleanFlag(tokens.get(0)));
     }
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("aaa OR bbb OR ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("aaa OR bbb OR ccc"));
       assertTrue("Should have 3 tokens",           tokens != null && tokens.size()==3);
       assertTrue("token 1 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(0)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 2 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(1)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 3 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(2)) && hasInBooleanFlag(tokens.get(0)));
     }
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("aaa AND bbb NOT ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("aaa AND bbb NOT ccc"));
       assertTrue("Should have 3 tokens",            tokens != null && tokens.size()==3);
       assertTrue("token 1 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(0)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 2 precedes n.b.o.",          hasNBOFlag(tokens.get(1)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 3 doesn't precede n.b.o.",  !hasNBOFlag(tokens.get(2)) && hasInBooleanFlag(tokens.get(0)));
     }
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("aaa NOT bbb AND ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("aaa NOT bbb AND ccc"));
       assertTrue("Should have 3 tokens",           tokens != null && tokens.size()==3);
       assertTrue("token 1 precedes n.b.o.",          hasNBOFlag(tokens.get(0)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 2 precedes n.b.o.",          hasNBOFlag(tokens.get(1)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 3 doesn't precedes n.b.o.", !hasNBOFlag(tokens.get(2)) && hasInBooleanFlag(tokens.get(0)));
     }
     {
-      List<Token> tokens = new ArrayList<Token>(converter.convert("aaa AND NOT bbb AND ccc"));
+      List<Token> tokens = new ArrayList<>(converter.convert("aaa AND NOT bbb AND ccc"));
       assertTrue("Should have 3 tokens",           tokens != null && tokens.size()==3);
       assertTrue("token 1 precedes n.b.o.",          hasNBOFlag(tokens.get(0)) && hasInBooleanFlag(tokens.get(0)));
       assertTrue("token 2 precedes n.b.o.",          hasNBOFlag(tokens.get(1)) && hasInBooleanFlag(tokens.get(0)));

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java Wed Mar 12 14:39:17 2014
@@ -58,7 +58,7 @@ public class WordBreakSolrSpellCheckerTe
   public void testStandAlone() throws Exception {
     SolrCore core = h.getCore();
     WordBreakSolrSpellChecker checker = new WordBreakSolrSpellChecker();
-    NamedList<String> params = new NamedList<String>();
+    NamedList<String> params = new NamedList<>();
     params.add("field", "lowerfilt");
     params.add(WordBreakSolrSpellChecker.PARAM_BREAK_WORDS, "true");
     params.add(WordBreakSolrSpellChecker.PARAM_COMBINE_WORDS, "true");

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java Wed Mar 12 14:39:17 2014
@@ -150,7 +150,7 @@ public class HdfsDirectoryTest extends S
   public void testRandomAccessWrites() throws IOException {
     int i = 0;
     try {
-      Set<String> names = new HashSet<String>();
+      Set<String> names = new HashSet<>();
       for (; i< 10; i++) {
         Directory fsDir = new RAMDirectory();
         String name = getName();

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java Wed Mar 12 14:39:17 2014
@@ -188,7 +188,7 @@ public class AddBlockUpdateTest extends 
   
   @Test
   public void testBasics() throws Exception {
-    List<Document> blocks = new ArrayList<Document>(Arrays.asList(
+    List<Document> blocks = new ArrayList<>(Arrays.asList(
         block("abcD"),
         block("efgH"),
         merge(block("ijkL"), block("mnoP")),
@@ -268,7 +268,7 @@ public class AddBlockUpdateTest extends 
   public void testSolrJXML() throws IOException {
     UpdateRequest req = new UpdateRequest();
     
-    List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
+    List<SolrInputDocument> docs = new ArrayList<>();
     
     SolrInputDocument document1 = new SolrInputDocument() {
       {
@@ -276,7 +276,7 @@ public class AddBlockUpdateTest extends 
         addField("id", id);
         addField("parent_s", "X");
         
-        ArrayList<SolrInputDocument> ch1 = new ArrayList<SolrInputDocument>(
+        ArrayList<SolrInputDocument> ch1 = new ArrayList<>(
             Arrays.asList(new SolrInputDocument() {
               {
                 addField("id", id());
@@ -336,7 +336,7 @@ public class AddBlockUpdateTest extends 
   public void testXML() throws IOException, XMLStreamException {
     UpdateRequest req = new UpdateRequest();
     
- List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
+ List<SolrInputDocument> docs = new ArrayList<>();
     
  
     String xml_doc1 =
@@ -571,7 +571,7 @@ public class AddBlockUpdateTest extends 
   }
   
   private Collection<? extends Callable<Void>> callables(List<Document> blocks) {
-    final List<Callable<Void>> rez = new ArrayList<Callable<Void>>();
+    final List<Callable<Void>> rez = new ArrayList<>();
     for (Document block : blocks) {
       final String msg = block.asXML();
       if (msg.length() > 0) {

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java Wed Mar 12 14:39:17 2014
@@ -142,7 +142,7 @@ public class AutoCommitTest extends Abst
    */
   public static Collection<ContentStream> toContentStreams( final String str, final String contentType )
   {
-    ArrayList<ContentStream> streams = new ArrayList<ContentStream>();
+    ArrayList<ContentStream> streams = new ArrayList<>();
     ContentStreamBase stream = new ContentStreamBase.StringStream( str );
     stream.setContentType( contentType );
     streams.add( stream );

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java Wed Mar 12 14:39:17 2014
@@ -171,7 +171,7 @@ public class DirectUpdateHandlerTest ext
     ureq.close();
     
     // search - "B" should not be found.
-    Map<String,String> args = new HashMap<String, String>();
+    Map<String,String> args = new HashMap<>();
     args.put( CommonParams.Q, "id:A OR id:B" );
     args.put( "indent", "true" );
     SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -217,7 +217,7 @@ public class DirectUpdateHandlerTest ext
     ureq.close();
 
     // search - "A","B" should be found.
-    Map<String,String> args = new HashMap<String, String>();
+    Map<String,String> args = new HashMap<>();
     args.put( CommonParams.Q, "id:A OR id:B" );
     args.put( "indent", "true" );
     SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java Wed Mar 12 14:39:17 2014
@@ -346,9 +346,9 @@ public class SoftAutoCommitTest extends 
 class MockEventListener implements SolrEventListener {
 
   // use capacity bound Queues just so we're sure we don't OOM 
-  public final BlockingQueue<Long> soft = new LinkedBlockingQueue<Long>(1000);
-  public final BlockingQueue<Long> hard = new LinkedBlockingQueue<Long>(1000);
-  public final BlockingQueue<Long> searcher = new LinkedBlockingQueue<Long>(1000);
+  public final BlockingQueue<Long> soft = new LinkedBlockingQueue<>(1000);
+  public final BlockingQueue<Long> hard = new LinkedBlockingQueue<>(1000);
+  public final BlockingQueue<Long> searcher = new LinkedBlockingQueue<>(1000);
 
   // if non enpty, then at least one offer failed (queues full)
   private StringBuffer fail = new StringBuffer();

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java Wed Mar 12 14:39:17 2014
@@ -133,7 +133,7 @@ public class SolrCmdDistributorTest exte
     
     ModifiableSolrParams params = new ModifiableSolrParams();
 
-    List<Node> nodes = new ArrayList<Node>();
+    List<Node> nodes = new ArrayList<>();
 
     ZkNodeProps nodeProps = new ZkNodeProps(ZkStateReader.BASE_URL_PROP,
         ((HttpSolrServer) controlClient).getBaseURL(),
@@ -325,7 +325,7 @@ public class SolrCmdDistributorTest exte
     final MockStreamingSolrServers ss = new MockStreamingSolrServers(updateShardHandler);
     SolrCmdDistributor cmdDistrib = new SolrCmdDistributor(ss, 5, 0);
     ss.setExp(Exp.CONNECT_EXCEPTION);
-    ArrayList<Node> nodes = new ArrayList<Node>();
+    ArrayList<Node> nodes = new ArrayList<>();
     final HttpSolrServer solrclient1 = (HttpSolrServer) clients.get(0);
     
     final AtomicInteger retries = new AtomicInteger();
@@ -359,7 +359,7 @@ public class SolrCmdDistributorTest exte
     final MockStreamingSolrServers ss = new MockStreamingSolrServers(updateShardHandler);
     SolrCmdDistributor cmdDistrib = new SolrCmdDistributor(ss, 5, 0);
     ss.setExp(Exp.CONNECT_EXCEPTION);
-    ArrayList<Node> nodes = new ArrayList<Node>();
+    ArrayList<Node> nodes = new ArrayList<>();
 
     ZkNodeProps nodeProps = new ZkNodeProps(ZkStateReader.BASE_URL_PROP, solrclient.getBaseURL(),
         ZkStateReader.CORE_NAME_PROP, "");
@@ -405,7 +405,7 @@ public class SolrCmdDistributorTest exte
     final MockStreamingSolrServers ss = new MockStreamingSolrServers(updateShardHandler);
     SolrCmdDistributor cmdDistrib = new SolrCmdDistributor(ss, 5, 0);
     ss.setExp(Exp.SOCKET_EXCEPTION);
-    ArrayList<Node> nodes = new ArrayList<Node>();
+    ArrayList<Node> nodes = new ArrayList<>();
 
     ZkNodeProps nodeProps = new ZkNodeProps(ZkStateReader.BASE_URL_PROP, solrclient.getBaseURL(),
         ZkStateReader.CORE_NAME_PROP, "");
@@ -453,7 +453,7 @@ public class SolrCmdDistributorTest exte
     long numFoundBefore = solrclient.query(new SolrQuery("*:*")).getResults()
         .getNumFound();
     
-    ArrayList<Node> nodes = new ArrayList<Node>();
+    ArrayList<Node> nodes = new ArrayList<>();
 
     ZkNodeProps nodeProps = new ZkNodeProps(ZkStateReader.BASE_URL_PROP, "[ff01::114]:33332" + context, ZkStateReader.CORE_NAME_PROP, "");
     RetryNode retryNode = new RetryNode(new ZkCoreNodeProps(nodeProps), null, "collection1", "shard1") {

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java Wed Mar 12 14:39:17 2014
@@ -367,7 +367,7 @@ public class TestDocBasedVersionConstrai
         final int winner = TestUtil.nextInt(random(), 0, numAdds - 1);
         final int winnerVersion = atLeast(100);
         final boolean winnerIsDeleted = (0 == TestUtil.nextInt(random(), 0, 4));
-        List<Callable<Object>> tasks = new ArrayList<Callable<Object>>(numAdds);
+        List<Callable<Object>> tasks = new ArrayList<>(numAdds);
         for (int variant = 0; variant < numAdds; variant++) {
           final boolean iShouldWin = (variant==winner);
           final long version = (iShouldWin ? winnerVersion 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java Wed Mar 12 14:39:17 2014
@@ -415,7 +415,7 @@ public class FieldMutatingUpdateProcesso
     // test something that's definitely a SortedSet
 
     special = new SolrInputField("foo_s");
-    special.setValue(new TreeSet<String>
+    special.setValue(new TreeSet<>
                      (Arrays.asList("ggg", "first", "last", "hhh")), 1.2F);
     
     d = processAdd("last-value", 
@@ -443,7 +443,7 @@ public class FieldMutatingUpdateProcesso
     // (ie: get default behavior of Collection using iterator)
 
     special = new SolrInputField("foo_s");
-    special.setValue(new LinkedHashSet<String>
+    special.setValue(new LinkedHashSet<>
                      (Arrays.asList("first", "ggg", "hhh", "last")), 1.2F);
     
     d = processAdd("last-value", 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java Wed Mar 12 14:39:17 2014
@@ -240,7 +240,7 @@ public class ParsingFieldUpdateProcessor
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNull(schema.getFieldOrNull("not_in_schema"));
     DateTimeFormatter dateTimeFormatter = ISODateTimeFormat.dateOptionalTimeParser().withZoneUTC();
-    Map<Object,Object> mixed = new HashMap<Object,Object>();
+    Map<Object,Object> mixed = new HashMap<>();
     String[] dateStrings = { "2020-05-13T18:47", "1989-12-14", "1682-07-22T18:33:00.000Z" };
     for (String dateString : dateStrings) {
       mixed.put(dateTimeFormatter.parseDateTime(dateString).toDate(), dateString);
@@ -339,7 +339,7 @@ public class ParsingFieldUpdateProcessor
   public void testFailedParseMixedInt() throws Exception {
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNull(schema.getFieldOrNull("not_in_schema"));
-    Map<Object,Object> mixed = new HashMap<Object,Object>();
+    Map<Object,Object> mixed = new HashMap<>();
     Float floatVal = 294423.0f;
     mixed.put(85, "85");
     mixed.put(floatVal, floatVal); // Float-typed field value
@@ -422,7 +422,7 @@ public class ParsingFieldUpdateProcessor
   public void testFailedParseMixedLong() throws Exception {
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNull(schema.getFieldOrNull("not_in_schema"));
-    Map<Object,Object> mixed = new HashMap<Object,Object>();
+    Map<Object,Object> mixed = new HashMap<>();
     Float floatVal = 294423.0f;
     mixed.put(85L, "85");
     mixed.put(floatVal, floatVal); // Float-typed field value
@@ -506,7 +506,7 @@ public class ParsingFieldUpdateProcessor
   public void testMixedFloats() throws Exception {
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNotNull(schema.getFieldOrNull("float_tf")); // should match dynamic field "*_tf"
-    Map<Float,Object> mixedFloats = new HashMap<Float,Object>();
+    Map<Float,Object> mixedFloats = new HashMap<>();
     mixedFloats.put(85.0f, "85");
     mixedFloats.put(2894518.0f, "2,894,518");
     mixedFloats.put(2.94423E-9f, 2.94423E-9f); // Float-typed field value
@@ -524,7 +524,7 @@ public class ParsingFieldUpdateProcessor
   public void testFailedParseMixedFloat() throws Exception {
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNull(schema.getFieldOrNull("not_in_schema"));
-    Map<Object,Object> mixed = new HashMap<Object,Object>();
+    Map<Object,Object> mixed = new HashMap<>();
     Long longVal = 294423L;
     mixed.put(85L, "85");
     mixed.put(longVal, longVal); // Float-typed field value
@@ -608,7 +608,7 @@ public class ParsingFieldUpdateProcessor
   public void testFailedParseMixedDouble() throws Exception {
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNull(schema.getFieldOrNull("not_in_schema"));
-    Map<Object,Object> mixed = new HashMap<Object,Object>();
+    Map<Object,Object> mixed = new HashMap<>();
     Long longVal = 294423L;
     mixed.put(85, "85.0");
     mixed.put(longVal, longVal); // Float-typed field value
@@ -710,7 +710,7 @@ public class ParsingFieldUpdateProcessor
   public void testFailedParseMixedBoolean() throws Exception {
     IndexSchema schema = h.getCore().getLatestSchema();
     assertNull(schema.getFieldOrNull("not_in_schema"));
-    Map<Object,Object> mixed = new HashMap<Object,Object>();
+    Map<Object,Object> mixed = new HashMap<>();
     Long longVal = 294423L;
     mixed.put(true, "true");
     mixed.put(longVal, longVal); // Float-typed field value
@@ -739,7 +739,7 @@ public class ParsingFieldUpdateProcessor
     SolrInputDocument d = null;
     String chain = "cascading-parsers-no-run-processor";
     
-    Map<Boolean,String> booleans = new HashMap<Boolean,String>();
+    Map<Boolean,String> booleans = new HashMap<>();
     booleans.put(true, "truE");
     booleans.put(false, "False");
     d = processAdd(chain, doc(f("id", "341"), f(fieldName, booleans.values())));
@@ -750,7 +750,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(booleans.isEmpty());
 
-    Map<Integer,String> ints = new HashMap<Integer,String>();
+    Map<Integer,String> ints = new HashMap<>();
     ints.put(2, "2");
     ints.put(50928, "50928");
     ints.put(86942008, "86,942,008");
@@ -762,7 +762,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(ints.isEmpty());
 
-    Map<Long,String> longs = new HashMap<Long,String>();
+    Map<Long,String> longs = new HashMap<>();
     longs.put(2L, "2");
     longs.put(50928L, "50928");
     longs.put(86942008987654L, "86,942,008,987,654");
@@ -789,7 +789,7 @@ public class ParsingFieldUpdateProcessor
     }
     */
 
-    Map<Double,String> doubles = new HashMap<Double,String>();
+    Map<Double,String> doubles = new HashMap<>();
     doubles.put(2.0, "2.");
     doubles.put(509.28, "509.28");
     doubles.put(86942.008, "86,942.008");
@@ -801,7 +801,7 @@ public class ParsingFieldUpdateProcessor
     }
 
     DateTimeFormatter dateTimeFormatter = ISODateTimeFormat.dateOptionalTimeParser().withZoneUTC();
-    Map<Date,String> dates = new HashMap<Date,String>();
+    Map<Date,String> dates = new HashMap<>();
     String[] dateStrings = { "2020-05-13T18:47", "1989-12-14", "1682-07-22T18:33:00.000Z" };
     for (String dateString : dateStrings) {
       dates.put(dateTimeFormatter.parseDateTime(dateString).toDate(), dateString);
@@ -814,7 +814,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(dates.isEmpty());
     
-    Map<Double,String> mixedLongsAndDoubles = new LinkedHashMap<Double,String>(); // preserve order
+    Map<Double,String> mixedLongsAndDoubles = new LinkedHashMap<>(); // preserve order
     mixedLongsAndDoubles.put(85.0, "85");
     mixedLongsAndDoubles.put(2.94423E-9, "2.94423E-9");
     mixedLongsAndDoubles.put(2894518.0, "2,894,518");
@@ -827,7 +827,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(mixedLongsAndDoubles.isEmpty());
     
-    Set<String> mixed = new HashSet<String>();
+    Set<String> mixed = new HashSet<>();
     mixed.add("true");
     mixed.add("1682-07-22T18:33:00.000Z");
     mixed.add("2,894,518");
@@ -839,7 +839,7 @@ public class ParsingFieldUpdateProcessor
       assertTrue(o instanceof String);
     }
 
-    Map<Double,Object> mixedDoubles = new LinkedHashMap<Double,Object>(); // preserve order
+    Map<Double,Object> mixedDoubles = new LinkedHashMap<>(); // preserve order
     mixedDoubles.put(85.0, "85");
     mixedDoubles.put(2.94423E-9, 2.94423E-9); // Double-typed field value
     mixedDoubles.put(2894518.0, "2,894,518");
@@ -852,7 +852,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(mixedDoubles.isEmpty());
 
-    Map<Integer,Object> mixedInts = new LinkedHashMap<Integer,Object>(); // preserve order
+    Map<Integer,Object> mixedInts = new LinkedHashMap<>(); // preserve order
     mixedInts.put(85, "85");
     mixedInts.put(294423, 294423); // Integer-typed field value
     mixedInts.put(-2894518, "-2,894,518");
@@ -865,7 +865,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(mixedInts.isEmpty());
 
-    Map<Long,Object> mixedLongs = new LinkedHashMap<Long,Object>(); // preserve order
+    Map<Long,Object> mixedLongs = new LinkedHashMap<>(); // preserve order
     mixedLongs.put(85L, "85");
     mixedLongs.put(42944233L, 42944233L); // Long-typed field value
     mixedLongs.put(2894518L, "2,894,518");
@@ -878,7 +878,7 @@ public class ParsingFieldUpdateProcessor
     }
     assertTrue(mixedLongs.isEmpty());
 
-    Map<Boolean,Object> mixedBooleans = new LinkedHashMap<Boolean,Object>(); // preserve order
+    Map<Boolean,Object> mixedBooleans = new LinkedHashMap<>(); // preserve order
     mixedBooleans.put(true, "true");
     mixedBooleans.put(false, false); // Boolean-typed field value
     mixedBooleans.put(false, "false");
@@ -892,7 +892,7 @@ public class ParsingFieldUpdateProcessor
     assertTrue(mixedBooleans.isEmpty());
 
     dateTimeFormatter = ISODateTimeFormat.dateOptionalTimeParser().withZoneUTC();
-    Map<Date,Object> mixedDates = new HashMap<Date,Object>();
+    Map<Date,Object> mixedDates = new HashMap<>();
     dateStrings = new String[] { "2020-05-13T18:47", "1989-12-14", "1682-07-22T18:33:00.000Z" };
     for (String dateString : dateStrings) {
       mixedDates.put(dateTimeFormatter.parseDateTime(dateString).toDate(), dateString);

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java Wed Mar 12 14:39:17 2014
@@ -253,7 +253,7 @@ public class SignatureUpdateProcessorFac
   public void testFailNonIndexedSigWithOverwriteDupes() throws Exception {
     SolrCore core = h.getCore();
     SignatureUpdateProcessorFactory f = new SignatureUpdateProcessorFactory();
-    NamedList<String> initArgs = new NamedList<String>();
+    NamedList<String> initArgs = new NamedList<>();
     initArgs.add("overwriteDupes", "true");
     initArgs.add("signatureField", "signatureField_sS");
     f.init(initArgs);
@@ -278,7 +278,7 @@ public class SignatureUpdateProcessorFac
         .getFactories()[0]);
     factory.setEnabled(true);
     
-    Map<String,String[]> params = new HashMap<String,String[]>();
+    Map<String,String[]> params = new HashMap<>();
     MultiMapSolrParams mmparams = new MultiMapSolrParams(params);
     params.put(UpdateParams.UPDATE_CHAIN, new String[] {chain});
     
@@ -307,7 +307,7 @@ public class SignatureUpdateProcessorFac
       SolrInputDocument docA = new SolrInputDocument();
       SolrInputDocument docB = new SolrInputDocument();
 
-      UnusualList<Integer> ints = new UnusualList<Integer>(3);
+      UnusualList<Integer> ints = new UnusualList<>(3);
       for (int val : new int[] {42, 66, 34}) {
         docA.addField("ints_is", new Integer(val));
         ints.add(val);
@@ -333,7 +333,7 @@ public class SignatureUpdateProcessorFac
     }
         
 
-    ArrayList<ContentStream> streams = new ArrayList<ContentStream>(2);
+    ArrayList<ContentStream> streams = new ArrayList<>(2);
     streams.add(new BinaryRequestWriter().getContentStream(ureq));
     LocalSolrQueryRequest req = new LocalSolrQueryRequest(h.getCore(), mmparams);
     try {
@@ -368,7 +368,7 @@ public class SignatureUpdateProcessorFac
   }
 
   static void addDoc(String doc, String chain) throws Exception {
-    Map<String, String[]> params = new HashMap<String, String[]>();
+    Map<String, String[]> params = new HashMap<>();
     MultiMapSolrParams mmparams = new MultiMapSolrParams(params);
     params.put(UpdateParams.UPDATE_CHAIN, new String[] { chain });
     SolrQueryRequestBase req = new SolrQueryRequestBase(h.getCore(),
@@ -377,7 +377,7 @@ public class SignatureUpdateProcessorFac
 
     UpdateRequestHandler handler = new UpdateRequestHandler();
     handler.init(null);
-    ArrayList<ContentStream> streams = new ArrayList<ContentStream>(2);
+    ArrayList<ContentStream> streams = new ArrayList<>(2);
     streams.add(new ContentStreamBase.StringStream(doc));
     req.setContentStreams(streams);
     handler.handleRequestBody(req, new SolrQueryResponse());

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java Wed Mar 12 14:39:17 2014
@@ -77,7 +77,7 @@ public class StatelessScriptUpdateProces
     SolrCore core = h.getCore();
     UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("single-script");
     final StatelessScriptUpdateProcessorFactory factory = ((StatelessScriptUpdateProcessorFactory) chained.getFactories()[0]);
-    final List<String> functionMessages = new ArrayList<String>();
+    final List<String> functionMessages = new ArrayList<>();
     factory.setScriptEngineCustomizer(new ScriptEngineCustomizer() {
       @Override
       public void customize(ScriptEngine engine) {
@@ -122,7 +122,7 @@ public class StatelessScriptUpdateProces
       UpdateRequestProcessorChain chained = core.getUpdateProcessingChain(chain);
       final StatelessScriptUpdateProcessorFactory factory = 
         ((StatelessScriptUpdateProcessorFactory) chained.getFactories()[0]);
-      final List<String> functionMessages = new ArrayList<String>();
+      final List<String> functionMessages = new ArrayList<>();
       ScriptEngineCustomizer customizer = new ScriptEngineCustomizer() {
           @Override
           public void customize(ScriptEngine engine) {

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java Wed Mar 12 14:39:17 2014
@@ -106,7 +106,7 @@ public class UniqFieldsUpdateProcessorFa
   }
 
   private void addDoc(String doc) throws Exception {
-    Map<String, String[]> params = new HashMap<String, String[]>();
+    Map<String, String[]> params = new HashMap<>();
     MultiMapSolrParams mmparams = new MultiMapSolrParams(params);
     params.put(UpdateParams.UPDATE_CHAIN, new String[] { "uniq-fields" });
     SolrQueryRequestBase req = new SolrQueryRequestBase(h.getCore(),
@@ -115,7 +115,7 @@ public class UniqFieldsUpdateProcessorFa
 
     UpdateRequestHandler handler = new UpdateRequestHandler();
     handler.init(null);
-    ArrayList<ContentStream> streams = new ArrayList<ContentStream>(2);
+    ArrayList<ContentStream> streams = new ArrayList<>(2);
     streams.add(new ContentStreamBase.StringStream(doc));
     req.setContentStreams(streams);
     handler.handleRequestBody(req, new SolrQueryResponse());

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/CircularListTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/CircularListTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/CircularListTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/CircularListTest.java Wed Mar 12 14:39:17 2014
@@ -30,7 +30,7 @@ public class CircularListTest  extends L
 
   @Test
   public void testCircularList() throws IOException {
-    CircularList<Integer> list = new CircularList<Integer>(10);
+    CircularList<Integer> list = new CircularList<>(10);
     for(int i=0;i<10; i++) {
       list.add(new Integer(i));
     }

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DOMUtilTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DOMUtilTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DOMUtilTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DOMUtilTest.java Wed Mar 12 14:39:17 2014
@@ -23,7 +23,7 @@ import org.apache.solr.common.util.Simpl
 public class DOMUtilTest extends DOMUtilTestBase {
   
   public void testAddToNamedListPrimitiveTypes() throws Exception {
-    NamedList<Object> namedList = new SimpleOrderedMap<Object>();
+    NamedList<Object> namedList = new SimpleOrderedMap<>();
     DOMUtil.addToNamedList( getNode( "<str name=\"String\">STRING</str>", "/str" ), namedList, null );
     assertTypeAndValue( namedList, "String", "STRING" );
     DOMUtil.addToNamedList( getNode( "<int name=\"Integer\">100</int>", "/int" ), namedList, null );

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DateMathParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DateMathParserTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DateMathParserTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/DateMathParserTest.java Wed Mar 12 14:39:17 2014
@@ -314,7 +314,7 @@ public class DateMathParserTest extends 
     DateMathParser p = new DateMathParser(UTC, Locale.ROOT);
     p.setNow(parser.parse("2001-07-04T12:08:56.235"));
     
-    Map<String,Integer> badCommands = new HashMap<String,Integer>();
+    Map<String,Integer> badCommands = new HashMap<>();
     badCommands.put("/", 1);
     badCommands.put("+", 1);
     badCommands.put("-", 1);

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java Wed Mar 12 14:39:17 2014
@@ -177,8 +177,8 @@ public class SimplePostToolTest extends 
   }
 
   static class MockPageFetcher extends PageFetcher {
-    HashMap<String,String> htmlMap = new HashMap<String,String>();
-    HashMap<String,Set<URL>> linkMap = new HashMap<String,Set<URL>>();
+    HashMap<String,String> htmlMap = new HashMap<>();
+    HashMap<String,Set<URL>> linkMap = new HashMap<>();
     
     public MockPageFetcher() throws IOException {
       (new SimplePostTool()).super();
@@ -190,18 +190,18 @@ public class SimplePostToolTest extends 
       htmlMap.put("http://[ff01::114]/page2", "<html><body><a href=\"http://[ff01::114]/\"><a href=\"http://[ff01::114]/disallowed\"/></body></html>");
       htmlMap.put("http://[ff01::114]/disallowed", "<html><body><a href=\"http://[ff01::114]/\"></body></html>");
 
-      Set<URL> s = new HashSet<URL>();
+      Set<URL> s = new HashSet<>();
       s.add(new URL("http://[ff01::114]/page1"));
       s.add(new URL("http://[ff01::114]/page2"));
       linkMap.put("http://[ff01::114]", s);
       linkMap.put("http://[ff01::114]/index.html", s);
-      s = new HashSet<URL>();
+      s = new HashSet<>();
       s.add(new URL("http://[ff01::114]/page1/foo"));
       linkMap.put("http://[ff01::114]/page1", s);
-      s = new HashSet<URL>();
+      s = new HashSet<>();
       s.add(new URL("http://[ff01::114]/page1/foo/bar"));
       linkMap.put("http://[ff01::114]/page1/foo", s);
-      s = new HashSet<URL>();
+      s = new HashSet<>();
       s.add(new URL("http://[ff01::114]/disallowed"));
       linkMap.put("http://[ff01::114]/page2", s);
       
@@ -237,7 +237,7 @@ public class SimplePostToolTest extends 
     public Set<URL> getLinksFromWebPage(URL u, InputStream is, String type, URL postUrl) {
       Set<URL> s = linkMap.get(SimplePostTool.normalizeUrlEnding(u.toString()));
       if(s == null)
-        s = new HashSet<URL>();
+        s = new HashSet<>();
       return s;
     }
   }

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java Wed Mar 12 14:39:17 2014
@@ -76,7 +76,7 @@ public class SolrPluginUtilsTest extends
       
       DocList docs = qr.getDocList();
       assertEquals("wrong docs size", 3, docs.size());
-      Set<String> fields = new HashSet<String>();
+      Set<String> fields = new HashSet<>();
       fields.add("val_dynamic");
       fields.add("dynamic_val");
       fields.add("range_facet_l"); // copied from id
@@ -149,7 +149,7 @@ public class SolrPluginUtilsTest extends
   @Test
   public void testParseFieldBoosts() throws Exception {
 
-    Map<String,Float> e1 = new HashMap<String,Float>();
+    Map<String,Float> e1 = new HashMap<>();
     e1.put("fieldOne",2.3f);
     e1.put("fieldTwo",null);
     e1.put("fieldThree",-0.4f);
@@ -165,7 +165,7 @@ public class SolrPluginUtilsTest extends
                                "  fieldTwo fieldThree^-0.4   ",
                                " "}));
 
-    Map<String,Float> e2 = new HashMap<String,Float>();
+    Map<String,Float> e2 = new HashMap<>();
     assertEquals("empty e2", e2, SolrPluginUtils.parseFieldBoosts
                  (""));
     assertEquals("spacey e2", e2, SolrPluginUtils.parseFieldBoosts

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestFastWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestFastWriter.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestFastWriter.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestFastWriter.java Wed Mar 12 14:39:17 2014
@@ -28,7 +28,7 @@ import java.util.Random;
 
 
 class MemWriter extends FastWriter {
-  public List<char[]> buffers = new LinkedList<char[]>();
+  public List<char[]> buffers = new LinkedList<>();
 
   Random r;
   public MemWriter(char[] tempBuffer, Random r) {

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestNumberUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestNumberUtils.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestNumberUtils.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestNumberUtils.java Wed Mar 12 14:39:17 2014
@@ -126,7 +126,7 @@ public class TestNumberUtils extends Luc
     int iter=1000;
 
     // INTEGERS
-    List<Converter> converters = new ArrayList<Converter>();
+    List<Converter> converters = new ArrayList<>();
     converters.add( new Int2Int() );
     converters.add( new SortInt() );
     converters.add( new Base10kS() );

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestUtils.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestUtils.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TestUtils.java Wed Mar 12 14:39:17 2014
@@ -74,20 +74,20 @@ public class TestUtils extends LuceneTes
 
   public void testNamedLists()
   {
-    SimpleOrderedMap<Integer> map = new SimpleOrderedMap<Integer>();
+    SimpleOrderedMap<Integer> map = new SimpleOrderedMap<>();
     map.add( "test", 10 );
     SimpleOrderedMap<Integer> clone = map.clone();
     assertEquals( map.toString(), clone.toString() );
     assertEquals( new Integer(10), clone.get( "test" ) );
   
-    Map<String,Integer> realMap = new HashMap<String, Integer>();
+    Map<String,Integer> realMap = new HashMap<>();
     realMap.put( "one", 1 );
     realMap.put( "two", 2 );
     realMap.put( "three", 3 );
-    map = new SimpleOrderedMap<Integer>();
+    map = new SimpleOrderedMap<>();
     map.addAll( realMap );
     assertEquals( 3, map.size() );
-    map = new SimpleOrderedMap<Integer>();
+    map = new SimpleOrderedMap<>();
     map.add( "one", 1 );
     map.add( "two", 2 );
     map.add( "three", 3 );
@@ -101,7 +101,7 @@ public class TestUtils extends LuceneTes
     assertEquals( 4, map.indexOf( null, 1 ) );
     assertEquals( null, map.get( null, 1 ) );
 
-    map = new SimpleOrderedMap<Integer>();
+    map = new SimpleOrderedMap<>();
     map.add( "one", 1 );
     map.add( "two", 2 );
     Iterator<Map.Entry<String, Integer>> iter = map.iterator();

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java Wed Mar 12 14:39:17 2014
@@ -46,7 +46,7 @@ public class TimeZoneUtilsTest extends L
 
   public void testValidIds() throws Exception {
 
-    final Set<String> idsTested = new HashSet<String>();
+    final Set<String> idsTested = new HashSet<>();
 
     // brain dead: anything the JVM supports, should work
     for (String validId : TimeZone.getAvailableIDs()) {

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java Wed Mar 12 14:39:17 2014
@@ -620,7 +620,7 @@ public class SolrQuery extends Modifiabl
    * @since 4.2
    */
   public SolrQuery setSorts(List<SortClause> value) {
-    sortClauses = new ArrayList<SortClause>(value);
+    sortClauses = new ArrayList<>(value);
     serializeSorts();
     return this;
   }
@@ -674,7 +674,7 @@ public class SolrQuery extends Modifiabl
    * @since 4.2
    */
   public SolrQuery addSort(SortClause sortClause) {
-    if (sortClauses == null) sortClauses = new ArrayList<SortClause>();
+    if (sortClauses == null) sortClauses = new ArrayList<>();
     sortClauses.add(sortClause);
     serializeSorts();
     return this;

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java Wed Mar 12 14:39:17 2014
@@ -86,7 +86,7 @@ public abstract class SolrServer impleme
    */
   public UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws SolrServerException, IOException {
     DocumentObjectBinder binder = this.getBinder();
-    ArrayList<SolrInputDocument> docs =  new ArrayList<SolrInputDocument>(beans.size());
+    ArrayList<SolrInputDocument> docs =  new ArrayList<>(beans.size());
     for (Object bean : beans) {
       docs.add(binder.toSolrInputDocument(bean));
     }

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java Wed Mar 12 14:39:17 2014
@@ -34,14 +34,14 @@ import java.nio.ByteBuffer;
  */
 public class DocumentObjectBinder {
   
-  private final Map<Class, List<DocField>> infocache = new ConcurrentHashMap<Class, List<DocField>>();
+  private final Map<Class, List<DocField>> infocache = new ConcurrentHashMap<>();
 
   public DocumentObjectBinder() {
   }
 
   public <T> List<T> getBeans(Class<T> clazz, SolrDocumentList solrDocList) {
     List<DocField> fields = getDocFields(clazz);
-    List<T> result = new ArrayList<T>(solrDocList.size());
+    List<T> result = new ArrayList<>(solrDocList.size());
 
     for (SolrDocument sdoc : solrDocList) {
       result.add(getBean(clazz, fields, sdoc));
@@ -103,9 +103,9 @@ public class DocumentObjectBinder {
   }
 
   private List<DocField> collectInfo(Class clazz) {
-    List<DocField> fields = new ArrayList<DocField>();
+    List<DocField> fields = new ArrayList<>();
     Class superClazz = clazz;
-    List<AccessibleObject> members = new ArrayList<AccessibleObject>();
+    List<AccessibleObject> members = new ArrayList<>();
 
     while (superClazz != null && superClazz != Object.class) {
       members.addAll(Arrays.asList(superClazz.getDeclaredFields()));
@@ -275,7 +275,7 @@ public class DocumentObjectBinder {
       Map<String, Object> allValuesMap = null;
       List allValuesList = null;
       if (isContainedInMap) {
-        allValuesMap = new HashMap<String, Object>();
+        allValuesMap = new HashMap<>();
       } else {
         allValuesList = new ArrayList();
       }

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java Wed Mar 12 14:39:17 2014
@@ -46,7 +46,7 @@ public class BinaryRequestWriter extends
               && (updateRequest.getDocIterator() == null) ) {
         return null;
       }
-      List<ContentStream> l = new ArrayList<ContentStream>();
+      List<ContentStream> l = new ArrayList<>();
       l.add(new LazyContentStream(updateRequest));
       return l;
     } else {

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Wed Mar 12 14:39:17 2014
@@ -97,7 +97,7 @@ public class CloudSolrServer extends Sol
   private String idField = "id";
   private final Set<String> NON_ROUTABLE_PARAMS;
   {
-    NON_ROUTABLE_PARAMS = new HashSet<String>();
+    NON_ROUTABLE_PARAMS = new HashSet<>();
     NON_ROUTABLE_PARAMS.add(UpdateParams.EXPUNGE_DELETES);
     NON_ROUTABLE_PARAMS.add(UpdateParams.MAX_OPTIMIZE_SEGMENTS);
     NON_ROUTABLE_PARAMS.add(UpdateParams.COMMIT);
@@ -322,7 +322,7 @@ public class CloudSolrServer extends Sol
     long start = System.nanoTime();
 
     if (parallelUpdates) {
-      final Map<String, Future<NamedList<?>>> responseFutures = new HashMap<String, Future<NamedList<?>>>(routes.size());
+      final Map<String, Future<NamedList<?>>> responseFutures = new HashMap<>(routes.size());
       for (final Map.Entry<String, LBHttpSolrServer.Req> entry : routes.entrySet()) {
         final String url = entry.getKey();
         final LBHttpSolrServer.Req lbRequest = entry.getValue();
@@ -373,7 +373,7 @@ public class CloudSolrServer extends Sol
     
     Set<String> paramNames = nonRoutableParams.getParameterNames();
     
-    Set<String> intersection = new HashSet<String>(paramNames);
+    Set<String> intersection = new HashSet<>(paramNames);
     intersection.retainAll(NON_ROUTABLE_PARAMS);
     
     if (nonRoutableRequest != null || intersection.size() > 0) {
@@ -381,7 +381,7 @@ public class CloudSolrServer extends Sol
         nonRoutableRequest = new UpdateRequest();
       }
       nonRoutableRequest.setParams(nonRoutableParams);
-      List<String> urlList = new ArrayList<String>();
+      List<String> urlList = new ArrayList<>();
       urlList.addAll(routes.keySet());
       Collections.shuffle(urlList, rand);
       LBHttpSolrServer.Req req = new LBHttpSolrServer.Req(nonRoutableRequest, urlList);
@@ -402,13 +402,13 @@ public class CloudSolrServer extends Sol
   }
 
   private Map<String,List<String>> buildUrlMap(DocCollection col) {
-    Map<String, List<String>> urlMap = new HashMap<String, List<String>>();
+    Map<String, List<String>> urlMap = new HashMap<>();
     Collection<Slice> slices = col.getActiveSlices();
     Iterator<Slice> sliceIterator = slices.iterator();
     while (sliceIterator.hasNext()) {
       Slice slice = sliceIterator.next();
       String name = slice.getName();
-      List<String> urls = new ArrayList<String>();
+      List<String> urls = new ArrayList<>();
       Replica leader = slice.getLeader();
       if (leader == null) {
         // take unoptimized general path - we cannot find a leader yet
@@ -514,14 +514,14 @@ public class CloudSolrServer extends Sol
         }
       }
       sendToLeaders = true;
-      replicas = new ArrayList<String>();
+      replicas = new ArrayList<>();
     }
     
     SolrParams reqParams = request.getParams();
     if (reqParams == null) {
       reqParams = new ModifiableSolrParams();
     }
-    List<String> theUrlList = new ArrayList<String>();
+    List<String> theUrlList = new ArrayList<>();
     if (request.getPath().equals("/admin/collections")
         || request.getPath().equals("/admin/cores")) {
       Set<String> liveNodes = clusterState.getLiveNodes();
@@ -549,7 +549,7 @@ public class CloudSolrServer extends Sol
       // Retrieve slices from the cloud state and, for each collection
       // specified,
       // add it to the Map of slices.
-      Map<String,Slice> slices = new HashMap<String,Slice>();
+      Map<String,Slice> slices = new HashMap<>();
       for (String collectionName : collectionsList) {
         Collection<Slice> colSlices = clusterState
             .getActiveSlices(collectionName);
@@ -567,8 +567,8 @@ public class CloudSolrServer extends Sol
       
       // build a map of unique nodes
       // TODO: allow filtering by group, role, etc
-      Map<String,ZkNodeProps> nodes = new HashMap<String,ZkNodeProps>();
-      List<String> urlList2 = new ArrayList<String>();
+      Map<String,ZkNodeProps> nodes = new HashMap<>();
+      List<String> urlList2 = new ArrayList<>();
       for (Slice slice : slices.values()) {
         for (ZkNodeProps nodeProps : slice.getReplicasMap().values()) {
           ZkCoreNodeProps coreNodeProps = new ZkCoreNodeProps(nodeProps);
@@ -609,15 +609,15 @@ public class CloudSolrServer extends Sol
       }
       
       if (sendToLeaders) {
-        theUrlList = new ArrayList<String>(leaderUrlList.size());
+        theUrlList = new ArrayList<>(leaderUrlList.size());
         theUrlList.addAll(leaderUrlList);
       } else {
-        theUrlList = new ArrayList<String>(urlList.size());
+        theUrlList = new ArrayList<>(urlList.size());
         theUrlList.addAll(urlList);
       }
       Collections.shuffle(theUrlList, rand);
       if (sendToLeaders) {
-        ArrayList<String> theReplicas = new ArrayList<String>(
+        ArrayList<String> theReplicas = new ArrayList<>(
             replicasList.size());
         theReplicas.addAll(replicasList);
         Collections.shuffle(theReplicas, rand);
@@ -640,7 +640,7 @@ public class CloudSolrServer extends Sol
       String collection) {
     // Extract each comma separated collection name and store in a List.
     List<String> rawCollectionsList = StrUtils.splitSmart(collection, ",", true);
-    Set<String> collectionsList = new HashSet<String>();
+    Set<String> collectionsList = new HashSet<>();
     // validate collections
     for (String collectionName : rawCollectionsList) {
       if (!clusterState.getCollections().contains(collectionName)) {

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServer.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServer.java Wed Mar 12 14:39:17 2014
@@ -121,9 +121,9 @@ public class ConcurrentUpdateSolrServer 
       HttpClient client, int queueSize, int threadCount, ExecutorService es, boolean streamDeletes) {
     this.server = new HttpSolrServer(solrServerUrl, client);
     this.server.setFollowRedirects(false);
-    queue = new LinkedBlockingQueue<UpdateRequest>(queueSize);
+    queue = new LinkedBlockingQueue<>(queueSize);
     this.threadCount = threadCount;
-    runners = new LinkedList<Runner>();
+    runners = new LinkedList<>();
     scheduler = es;
     this.streamDeletes = streamDeletes;
   }
@@ -364,7 +364,7 @@ public class ConcurrentUpdateSolrServer 
     }
 
     // RETURN A DUMMY result
-    NamedList<Object> dummy = new NamedList<Object>();
+    NamedList<Object> dummy = new NamedList<>();
     dummy.add("NOTE", "the request is processed in a background stream");
     return dummy;
   }

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java Wed Mar 12 14:39:17 2014
@@ -269,7 +269,7 @@ public class HttpSolrServer extends Solr
               }
             }
             
-            LinkedList<NameValuePair> postParams = new LinkedList<NameValuePair>();
+            LinkedList<NameValuePair> postParams = new LinkedList<>();
             if (streams == null || isMultipart) {
               HttpPost post = new HttpPost(url + ClientUtils.toQueryString( queryParams, false ));
               post.setHeader("Content-Charset", "UTF-8");
@@ -278,7 +278,7 @@ public class HttpSolrServer extends Solr
                     "application/x-www-form-urlencoded; charset=UTF-8");
               }
 
-              List<FormBodyPart> parts = new LinkedList<FormBodyPart>();
+              List<FormBodyPart> parts = new LinkedList<>();
               Iterator<String> iter = wparams.getParameterNamesIterator();
               while (iter.hasNext()) {
                 String p = iter.next();
@@ -436,7 +436,7 @@ public class HttpSolrServer extends Solr
       if (processor == null) {
         
         // no processor specified, return raw stream
-        NamedList<Object> rsp = new NamedList<Object>();
+        NamedList<Object> rsp = new NamedList<>();
         rsp.add("stream", respBody);
         // Only case where stream should not be closed
         shouldClose = false;

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java?rev=1576755&r1=1576754&r2=1576755&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java Wed Mar 12 14:39:17 2014
@@ -76,7 +76,7 @@ import java.util.*;
  * @since solr 1.4
  */
 public class LBHttpSolrServer extends SolrServer {
-  private static Set<Integer> RETRY_CODES = new HashSet<Integer>(4);
+  private static Set<Integer> RETRY_CODES = new HashSet<>(4);
 
   static {
     RETRY_CODES.add(404);
@@ -87,10 +87,10 @@ public class LBHttpSolrServer extends So
 
   // keys to the maps are currently of the form "http://localhost:8983/solr"
   // which should be equivalent to CommonsHttpSolrServer.getBaseURL()
-  private final Map<String, ServerWrapper> aliveServers = new LinkedHashMap<String, ServerWrapper>();
+  private final Map<String, ServerWrapper> aliveServers = new LinkedHashMap<>();
   // access to aliveServers should be synchronized on itself
   
-  protected final Map<String, ServerWrapper> zombieServers = new ConcurrentHashMap<String, ServerWrapper>();
+  protected final Map<String, ServerWrapper> zombieServers = new ConcurrentHashMap<>();
 
   // changes to aliveServers are reflected in this array, no need to synchronize
   private volatile ServerWrapper[] aliveServerList = new ServerWrapper[0];
@@ -283,7 +283,7 @@ public class LBHttpSolrServer extends So
     Rsp rsp = new Rsp();
     Exception ex = null;
     boolean isUpdate = req.request instanceof IsUpdateRequest;
-    List<ServerWrapper> skipped = new ArrayList<ServerWrapper>(req.getNumDeadServersToTry());
+    List<ServerWrapper> skipped = new ArrayList<>(req.getNumDeadServersToTry());
 
     for (String serverStr : req.getServers()) {
       serverStr = normalize(serverStr);
@@ -505,7 +505,7 @@ public class LBHttpSolrServer extends So
         if (e.getRootCause() instanceof IOException) {
           ex = e;
           moveAliveToDead(wrapper);
-          if (justFailed == null) justFailed = new HashMap<String,ServerWrapper>();
+          if (justFailed == null) justFailed = new HashMap<>();
           justFailed.put(wrapper.getKey(), wrapper);
         } else {
           throw e;
@@ -619,7 +619,7 @@ public class LBHttpSolrServer extends So
           aliveCheckExecutor = Executors.newSingleThreadScheduledExecutor(
               new SolrjNamedThreadFactory("aliveCheckExecutor"));
           aliveCheckExecutor.scheduleAtFixedRate(
-                  getAliveCheckRunner(new WeakReference<LBHttpSolrServer>(this)),
+                  getAliveCheckRunner(new WeakReference<>(this)),
                   this.interval, this.interval, TimeUnit.MILLISECONDS);
         }
       }