lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1576837 [26/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/solr/core/src/test/org/apache/solr/schema/CopyFieldTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/CopyFieldTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/CopyFieldTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/CopyFieldTest.java Wed Mar 12 18:14:05 2014
@@ -128,7 +128,7 @@ public class CopyFieldTest extends SolrT
       assertU(adoc("id", "10", "title", "test copy field", "text_en", "this is a simple test of the copy field functionality"));
       assertU(commit());
       
-      Map<String,String> args = new HashMap<String, String>();
+      Map<String,String> args = new HashMap<>();
       args.put( CommonParams.Q, "text_en:simple" );
       args.put( "indent", "true" );
       SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -138,7 +138,7 @@ public class CopyFieldTest extends SolrT
               ,"//result/doc[1]/int[@name='id'][.='10']"
               );
       
-      args = new HashMap<String, String>();
+      args = new HashMap<>();
       args.put( CommonParams.Q, "highlight:simple" );
       args.put( "indent", "true" );
       req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -148,14 +148,14 @@ public class CopyFieldTest extends SolrT
               ,"//result/doc[1]/arr[@name='highlight']/str[.='this is a simple test of ']"
               );
 
-      args = new HashMap<String, String>();
+      args = new HashMap<>();
       args.put( CommonParams.Q, "text_en:functionality" );
       args.put( "indent", "true" );
       req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
       assertQ("Make sure they got in", req
               ,"//*[@numFound='1']");
       
-      args = new HashMap<String, String>();
+      args = new HashMap<>();
       args.put( CommonParams.Q, "highlight:functionality" );
       args.put( "indent", "true" );
       req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -189,7 +189,7 @@ public class CopyFieldTest extends SolrT
     assertU(adoc("id", "A5", "sku1", "10-1839ACX-93", "sku2", "AAM46"));
     assertU(commit());
 
-    Map<String,String> args = new HashMap<String, String>();
+    Map<String,String> args = new HashMap<>();
     args.put( CommonParams.Q, "text:AAM46" );
     args.put( "indent", "true" );
     SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -198,7 +198,7 @@ public class CopyFieldTest extends SolrT
         ,"//result/doc[1]/str[@name='id'][.='A5']"
     );
 
-    args = new HashMap<String, String>();
+    args = new HashMap<>();
     args.put( CommonParams.Q, "1_s:10-1839ACX-93" );
     args.put( "indent", "true" );
     req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -208,14 +208,14 @@ public class CopyFieldTest extends SolrT
         ,"//result/doc[1]/arr[@name='sku1']/str[.='10-1839ACX-93']"
     );
 
-    args = new HashMap<String, String>();
+    args = new HashMap<>();
     args.put( CommonParams.Q, "1_dest_sub_s:10-1839ACX-93" );
     args.put( "indent", "true" );
     req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
     assertQ("sku1 copied to *_dest_sub_s (*_s subset pattern)", req
         ,"//*[@numFound='1']");
 
-    args = new HashMap<String, String>();
+    args = new HashMap<>();
     args.put( CommonParams.Q, "dest_sub_no_ast_s:AAM46" );
     args.put( "indent", "true" );
     req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -237,7 +237,7 @@ public class CopyFieldTest extends SolrT
     assertU(adoc("id", "A5", "sku1", "10-1839ACX-93", "testing123_s", "AAM46"));
     assertU(commit());
 
-    Map<String,String> args = new HashMap<String, String>();
+    Map<String,String> args = new HashMap<>();
     args.put( CommonParams.Q, "text:AAM46" );
     args.put( "indent", "true" );
     SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/IndexSchemaTest.java Wed Mar 12 18:14:05 2014
@@ -48,7 +48,7 @@ public class IndexSchemaTest extends Sol
     assertU(adoc("id", "10", "title", "test", "aaa_dynamic", "aaa"));
     assertU(commit());
 
-    Map<String,String> args = new HashMap<String, String>();
+    Map<String,String> args = new HashMap<>();
     args.put( CommonParams.Q, "title:test" );
     args.put( "indent", "true" );
     SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -58,7 +58,7 @@ public class IndexSchemaTest extends Sol
             ,"//result/doc[1]/int[@name='id'][.='10']"
             );
 
-    args = new HashMap<String, String>();
+    args = new HashMap<>();
     args.put( CommonParams.Q, "aaa_dynamic:aaa" );
     args.put( "indent", "true" );
     req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
@@ -67,7 +67,7 @@ public class IndexSchemaTest extends Sol
             ,"//result/doc[1]/int[@name='id'][.='10']"
             );
 
-    args = new HashMap<String, String>();
+    args = new HashMap<>();
     args.put( CommonParams.Q, "dynamic_aaa:aaa" );
     args.put( "indent", "true" );
     req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/MockExchangeRateProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/MockExchangeRateProvider.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/MockExchangeRateProvider.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/MockExchangeRateProvider.java Wed Mar 12 18:14:05 2014
@@ -29,7 +29,7 @@ import org.apache.solr.common.SolrExcept
  * Simple mock provider with fixed rates and some assertions
  */
 public class MockExchangeRateProvider implements ExchangeRateProvider {
-  private static Map<String,Double> map = new HashMap<String,Double>();
+  private static Map<String,Double> map = new HashMap<>();
   static {
     map.put("USD,EUR", 0.8);
     map.put("EUR,USD", 1.2);
@@ -59,7 +59,7 @@ public class MockExchangeRateProvider im
     Set<String> currenciesPairs = map.keySet();
     Set<String> returnSet;
     
-    returnSet = new HashSet<String>();
+    returnSet = new HashSet<>();
     for (String c : currenciesPairs) {
       String[] pairs = c.split(",");
       returnSet.add(pairs[0]);

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/OpenExchangeRatesOrgProviderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/OpenExchangeRatesOrgProviderTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/OpenExchangeRatesOrgProviderTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/OpenExchangeRatesOrgProviderTest.java Wed Mar 12 18:14:05 2014
@@ -34,7 +34,7 @@ public class OpenExchangeRatesOrgProvide
 
   OpenExchangeRatesOrgProvider oerp;
   ResourceLoader loader;
-  private final Map<String,String> mockParams = new HashMap<String,String>();
+  private final Map<String,String> mockParams = new HashMap<>();
 
 
   @Override
@@ -59,7 +59,7 @@ public class OpenExchangeRatesOrgProvide
                  "open-exchange-rates.json", oerp.ratesFileLocation);
     assertEquals("Wrong default interval", (1440*60), oerp.refreshIntervalSeconds);
 
-    Map<String,String> params = new HashMap<String,String>();
+    Map<String,String> params = new HashMap<>();
     params.put(OpenExchangeRatesOrgProvider.PARAM_RATES_FILE_LOCATION, 
                "http://foo.bar/baz");
     params.put(OpenExchangeRatesOrgProvider.PARAM_REFRESH_INTERVAL, "100");

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java Wed Mar 12 18:14:05 2014
@@ -85,7 +85,7 @@ public class PreAnalyzedFieldTest extend
   public void testValidSimple() {
     PreAnalyzedField paf = new PreAnalyzedField();
     // use Simple format
-    HashMap<String,String> args = new HashMap<String,String>();
+    HashMap<String,String> args = new HashMap<>();
     args.put(PreAnalyzedField.PARSER_IMPL, SimplePreAnalyzedParser.class.getName());
     paf.init(h.getCore().getLatestSchema(), args);
     PreAnalyzedParser parser = new SimplePreAnalyzedParser();
@@ -128,7 +128,7 @@ public class PreAnalyzedFieldTest extend
   public void testParsers() {
     PreAnalyzedField paf = new PreAnalyzedField();
     // use Simple format
-    HashMap<String,String> args = new HashMap<String,String>();
+    HashMap<String,String> args = new HashMap<>();
     args.put(PreAnalyzedField.PARSER_IMPL, SimplePreAnalyzedParser.class.getName());
     paf.init(h.getCore().getLatestSchema(), args);
     try {

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java Wed Mar 12 18:14:05 2014
@@ -45,7 +45,7 @@ public class PrimitiveFieldTypeTest exte
     System.setProperty("solr.test.sys.prop2", "proptwo");
     System.setProperty("solr.allow.unsafe.resourceloading", "true");
 
-    initMap = new HashMap<String,String>();
+    initMap = new HashMap<>();
     config = new SolrConfig(new SolrResourceLoader("solr/collection1"), testConfHome + "solrconfig.xml", null);
   }
   

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java Wed Mar 12 18:14:05 2014
@@ -46,7 +46,7 @@ public class SortableBinaryField extends
   @Override
   public List<IndexableField> createFields(SchemaField field, Object value, float boost) {
     if (field.hasDocValues()) {
-      List<IndexableField> fields = new ArrayList<IndexableField>();
+      List<IndexableField> fields = new ArrayList<>();
       IndexableField storedField = createField(field, value, boost);
       fields.add(storedField);
       ByteBuffer byteBuffer = toObject(storedField);

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaAddField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaAddField.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaAddField.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaAddField.java Wed Mar 12 18:14:05 2014
@@ -57,14 +57,14 @@ public class TestCloudManagedSchemaAddFi
   
   @Override
   public SortedMap<ServletHolder,String> getExtraServlets() {
-    final SortedMap<ServletHolder,String> extraServlets = new TreeMap<ServletHolder,String>();
+    final SortedMap<ServletHolder,String> extraServlets = new TreeMap<>();
     final ServletHolder solrRestApi = new ServletHolder("SolrRestApi", ServerServlet.class);
     solrRestApi.setInitParameter("org.restlet.application", "org.apache.solr.rest.SolrRestApi");
     extraServlets.put(solrRestApi, "/schema/*");  // '/schema/*' matches '/schema', '/schema/', and '/schema/whatever...'
     return extraServlets;
   }
   
-  private List<RestTestHarness> restTestHarnesses = new ArrayList<RestTestHarness>();
+  private List<RestTestHarness> restTestHarnesses = new ArrayList<>();
   
   private void setupHarnesses() {
     for (int i = 0 ; i < clients.size() ; ++i) {

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java Wed Mar 12 18:14:05 2014
@@ -176,7 +176,7 @@ public class TestManagedSchema extends A
     String managedSchemaContents = FileUtils.readFileToString(managedSchemaFile, "UTF-8");
     assertFalse(managedSchemaContents.contains("\"new_field\""));
     
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     options.put("stored", "false");
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     String fieldName = "new_field";
@@ -225,7 +225,7 @@ public class TestManagedSchema extends A
     assertU(commit());
     assertQ(req("new_field:thing1"), "//*[@numFound='0']");
 
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     options.put("stored", "false");
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     String fieldName = "new_field";
@@ -252,7 +252,7 @@ public class TestManagedSchema extends A
     String errString = "Field 'str' already exists.";
     ignoreException(Pattern.quote(errString));
     try {
-      Map<String,Object> options = new HashMap<String,Object>();
+      Map<String,Object> options = new HashMap<>();
       IndexSchema oldSchema = h.getCore().getLatestSchema();
       String fieldName = "str";
       String fieldType = "string";
@@ -280,7 +280,7 @@ public class TestManagedSchema extends A
     System.setProperty("managed.schema.mutable", "true");
     initCore("solrconfig-managed-schema.xml", "schema-one-field-no-dynamic-field.xml", tmpSolrHome.getPath());
 
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     options.put("stored", "false");
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     String fieldName = "new_field";
@@ -320,7 +320,7 @@ public class TestManagedSchema extends A
     String errString = "Can't add dynamic field '*_s'.";
     ignoreException(Pattern.quote(errString));
     try {
-      Map<String,Object> options = new HashMap<String,Object>();
+      Map<String,Object> options = new HashMap<>();
       IndexSchema oldSchema = h.getCore().getLatestSchema();
       String fieldName = "*_s";
       String fieldType = "string";
@@ -356,7 +356,7 @@ public class TestManagedSchema extends A
     assertNull("Field '" + fieldName + "' is present in the schema", 
                h.getCore().getLatestSchema().getFieldOrNull(fieldName));
 
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     String fieldType = "string_disk";
     SchemaField newField = oldSchema.newField(fieldName, fieldType, options);
@@ -384,7 +384,7 @@ public class TestManagedSchema extends A
     assertNull("Field '" + fieldName + "' is present in the schema",
         h.getCore().getLatestSchema().getFieldOrNull(fieldName));
 
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     String fieldType = "text";
     SchemaField newField = oldSchema.newField(fieldName, fieldType, options);
@@ -409,7 +409,7 @@ public class TestManagedSchema extends A
     String managedSchemaContents = FileUtils.readFileToString(managedSchemaFile, "UTF-8");
     assertFalse(managedSchemaContents.contains("\"new_field\""));
 
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     options.put("stored", "false");
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     assertEquals("str", oldSchema.getUniqueKeyField().getName());
@@ -445,7 +445,7 @@ public class TestManagedSchema extends A
     assertNull("Field '" + fieldName + "' is present in the schema",
         h.getCore().getLatestSchema().getFieldOrNull(fieldName));
 
-    Map<String,Object> options = new HashMap<String,Object>();
+    Map<String,Object> options = new HashMap<>();
     IndexSchema oldSchema = h.getCore().getLatestSchema();
     String fieldType = "text";
     SchemaField newField = oldSchema.newField(fieldName, fieldType, options);

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/CursorMarkTest.java Wed Mar 12 18:14:05 2014
@@ -248,7 +248,7 @@ public class CursorMarkTest extends Solr
    * a list of the fields in the schema - excluding _version_
    */
   private Collection<String> getAllFieldNames() {
-    ArrayList<String> names = new ArrayList<String>(37);
+    ArrayList<String> names = new ArrayList<>(37);
     for (String f : h.getCore().getLatestSchema().getFields().keySet()) {
       if (! f.equals("_version_")) {
         names.add(f);

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java Wed Mar 12 18:14:05 2014
@@ -71,9 +71,9 @@ public class QueryEqualityTest extends S
   /** @see #testParserCoverage */
   private static boolean doAssertParserCoverage = false;
   /** @see #testParserCoverage */
-  private static final Set<String> qParsersTested = new HashSet<String>();
+  private static final Set<String> qParsersTested = new HashSet<>();
   /** @see #testParserCoverage */
-  private static final Set<String> valParsersTested = new HashSet<String>();
+  private static final Set<String> valParsersTested = new HashSet<>();
 
 
   public void testDateMathParsingEquality() throws Exception {

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java Wed Mar 12 18:14:05 2014
@@ -1146,7 +1146,7 @@ public class TestExtendedDismaxParser ex
 
       public FuzzyQueryParser(QParser parser, String defaultField) {
         super(parser, defaultField);
-        frequentlyMisspelledWords = new HashSet<String>();
+        frequentlyMisspelledWords = new HashSet<>();
         frequentlyMisspelledWords.add("absence");
       }
       

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java Wed Mar 12 18:14:05 2014
@@ -38,8 +38,8 @@ import java.util.concurrent.atomic.Atomi
 public class TestFastLRUCache extends LuceneTestCase {
   
   public void testPercentageAutowarm() throws IOException {
-    FastLRUCache<Object, Object> fastCache = new FastLRUCache<Object, Object>();
-    Map<String, String> params = new HashMap<String, String>();
+    FastLRUCache<Object, Object> fastCache = new FastLRUCache<>();
+    Map<String, String> params = new HashMap<>();
     params.put("size", "100");
     params.put("initialSize", "10");
     params.put("autowarmCount", "100%");
@@ -56,7 +56,7 @@ public class TestFastLRUCache extends Lu
     assertEquals(1L, nl.get("hits"));
     assertEquals(101L, nl.get("inserts"));
     assertEquals(null, fastCache.get(1));  // first item put in should be the first out
-    FastLRUCache<Object, Object> fastCacheNew = new FastLRUCache<Object, Object>();
+    FastLRUCache<Object, Object> fastCacheNew = new FastLRUCache<>();
     fastCacheNew.init(params, o, cr);
     fastCacheNew.warm(null, fastCache);
     fastCacheNew.setState(SolrCache.State.LIVE);
@@ -84,8 +84,8 @@ public class TestFastLRUCache extends Lu
   }
   
   private void doTestPercentageAutowarm(int limit, int percentage, int[] hits, int[]misses) {
-    FastLRUCache<Object, Object> fastCache = new FastLRUCache<Object, Object>();
-    Map<String, String> params = new HashMap<String, String>();
+    FastLRUCache<Object, Object> fastCache = new FastLRUCache<>();
+    Map<String, String> params = new HashMap<>();
     params.put("size", String.valueOf(limit));
     params.put("initialSize", "10");
     params.put("autowarmCount", percentage + "%");
@@ -96,7 +96,7 @@ public class TestFastLRUCache extends Lu
       fastCache.put(i, "" + i);//adds numbers from 1 to 100
     }
 
-    FastLRUCache<Object, Object> fastCacheNew = new FastLRUCache<Object, Object>();
+    FastLRUCache<Object, Object> fastCacheNew = new FastLRUCache<>();
     fastCacheNew.init(params, o, cr);
     fastCacheNew.warm(null, fastCache);
     fastCacheNew.setState(SolrCache.State.LIVE);
@@ -116,8 +116,8 @@ public class TestFastLRUCache extends Lu
   }
   
   public void testNoAutowarm() throws IOException {
-    FastLRUCache<Object, Object> fastCache = new FastLRUCache<Object, Object>();
-    Map<String, String> params = new HashMap<String, String>();
+    FastLRUCache<Object, Object> fastCache = new FastLRUCache<>();
+    Map<String, String> params = new HashMap<>();
     params.put("size", "100");
     params.put("initialSize", "10");
     CacheRegenerator cr = new NoOpRegenerator();
@@ -133,7 +133,7 @@ public class TestFastLRUCache extends Lu
     assertEquals(1L, nl.get("hits"));
     assertEquals(101L, nl.get("inserts"));
     assertEquals(null, fastCache.get(1));  // first item put in should be the first out
-    FastLRUCache<Object, Object> fastCacheNew = new FastLRUCache<Object, Object>();
+    FastLRUCache<Object, Object> fastCacheNew = new FastLRUCache<>();
     fastCacheNew.init(params, o, cr);
     fastCacheNew.warm(null, fastCache);
     fastCacheNew.setState(SolrCache.State.LIVE);
@@ -145,8 +145,8 @@ public class TestFastLRUCache extends Lu
   }
   
   public void testFullAutowarm() throws IOException {
-    FastLRUCache<Object, Object> cache = new FastLRUCache<Object, Object>();
-    Map<Object, Object> params = new HashMap<Object, Object>();
+    FastLRUCache<Object, Object> cache = new FastLRUCache<>();
+    Map<Object, Object> params = new HashMap<>();
     params.put("size", "100");
     params.put("initialSize", "10");
     params.put("autowarmCount", "-1");
@@ -162,7 +162,7 @@ public class TestFastLRUCache extends Lu
     assertEquals(null, cache.get(1));  // first item put in should be the first out
 
 
-    FastLRUCache<Object, Object> cacheNew = new FastLRUCache<Object, Object>();
+    FastLRUCache<Object, Object> cacheNew = new FastLRUCache<>();
     cacheNew.init(params, o, cr);
     cacheNew.warm(null, cache);
     cacheNew.setState(SolrCache.State.LIVE);
@@ -217,7 +217,7 @@ public class TestFastLRUCache extends Lu
   }
 
   public void testOldestItems() {
-    ConcurrentLRUCache<Integer, String> cache = new ConcurrentLRUCache<Integer, String>(100, 90);
+    ConcurrentLRUCache<Integer, String> cache = new ConcurrentLRUCache<>(100, 90);
     for (int i = 0; i < 50; i++) {
       cache.put(i + 1, "" + (i + 1));
     }
@@ -246,7 +246,7 @@ public class TestFastLRUCache extends Lu
     int sz = random().nextInt(100)+5;
     int lowWaterMark = random().nextInt(sz-3)+1;
     int keyrange = random().nextInt(sz*3)+1;
-    ConcurrentLRUCache<Integer, String> cache = new ConcurrentLRUCache<Integer, String>(sz, lowWaterMark);
+    ConcurrentLRUCache<Integer, String> cache = new ConcurrentLRUCache<>(sz, lowWaterMark);
     for (int i=0; i<10000; i++) {
       cache.put(random().nextInt(keyrange), "");
       cache.get(random().nextInt(keyrange));

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFiltering.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFiltering.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFiltering.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestFiltering.java Wed Mar 12 18:14:05 2014
@@ -271,7 +271,7 @@ public class TestFiltering extends SolrT
       int nonZeros=0;
       for (int qiter=0; qiter<queryIter; qiter++) {
         model.clear();
-        List<String> params = new ArrayList<String>();
+        List<String> params = new ArrayList<>();
         params.add("q"); params.add(makeRandomQuery(model, true, false));
 
         int nFilters = random().nextInt(5);

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLFUCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLFUCache.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLFUCache.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLFUCache.java Wed Mar 12 18:14:05 2014
@@ -186,7 +186,7 @@ public class TestLFUCache extends SolrTe
 
   @Test
   public void testItemOrdering() {
-    ConcurrentLFUCache<Integer, String> cache = new ConcurrentLFUCache<Integer, String>(100, 90);
+    ConcurrentLFUCache<Integer, String> cache = new ConcurrentLFUCache<>(100, 90);
     try {
       for (int i = 0; i < 50; i++) {
         cache.put(i + 1, "" + (i + 1));
@@ -252,7 +252,7 @@ public class TestLFUCache extends SolrTe
 
   @Test
   public void testTimeDecay() {
-    ConcurrentLFUCache<Integer, String> cacheDecay = new ConcurrentLFUCache<Integer, String>(10, 9);
+    ConcurrentLFUCache<Integer, String> cacheDecay = new ConcurrentLFUCache<>(10, 9);
     try {
       for (int i = 1; i < 21; i++) {
         cacheDecay.put(i, Integer.toString(i));
@@ -326,7 +326,7 @@ public class TestLFUCache extends SolrTe
   @Test
   public void testTimeNoDecay() {
 
-    ConcurrentLFUCache<Integer, String> cacheNoDecay = new ConcurrentLFUCache<Integer, String>(10, 9,
+    ConcurrentLFUCache<Integer, String> cacheNoDecay = new ConcurrentLFUCache<>(10, 9,
         (int) Math.floor((9 + 10) / 2), (int) Math.ceil(0.75 * 10), false, false, null, false);
     try {
       for (int i = 1; i < 21; i++) {

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLRUCache.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLRUCache.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestLRUCache.java Wed Mar 12 18:14:05 2014
@@ -31,8 +31,8 @@ import org.apache.solr.common.util.Named
 public class TestLRUCache extends LuceneTestCase {
 
   public void testFullAutowarm() throws IOException {
-    LRUCache<Object, Object> lruCache = new LRUCache<Object, Object>();
-    Map<String, String> params = new HashMap<String, String>();
+    LRUCache<Object, Object> lruCache = new LRUCache<>();
+    Map<String, String> params = new HashMap<>();
     params.put("size", "100");
     params.put("initialSize", "10");
     params.put("autowarmCount", "100%");
@@ -45,7 +45,7 @@ public class TestLRUCache extends Lucene
     assertEquals("25", lruCache.get(25));
     assertEquals(null, lruCache.get(110));
     assertEquals(null, lruCache.get(1));  // first item put in should be the first out
-    LRUCache<Object, Object> lruCacheNew = new LRUCache<Object, Object>();
+    LRUCache<Object, Object> lruCacheNew = new LRUCache<>();
     lruCacheNew.init(params, o, cr);
     lruCacheNew.warm(null, lruCache);
     lruCacheNew.setState(SolrCache.State.LIVE);
@@ -64,8 +64,8 @@ public class TestLRUCache extends Lucene
   }
   
   private void doTestPercentageAutowarm(int limit, int percentage, int[] hits, int[]misses) {
-    LRUCache<Object, Object> lruCache = new LRUCache<Object, Object>();
-    Map<String, String> params = new HashMap<String, String>();
+    LRUCache<Object, Object> lruCache = new LRUCache<>();
+    Map<String, String> params = new HashMap<>();
     params.put("size", String.valueOf(limit));
     params.put("initialSize", "10");
     params.put("autowarmCount", percentage + "%");
@@ -76,7 +76,7 @@ public class TestLRUCache extends Lucene
       lruCache.put(i, "" + i);//adds numbers from 1 to 100
     }
 
-    LRUCache<Object, Object> lruCacheNew = new LRUCache<Object, Object>();
+    LRUCache<Object, Object> lruCacheNew = new LRUCache<>();
     lruCacheNew.init(params, o, cr);
     lruCacheNew.warm(null, lruCache);
     lruCacheNew.setState(SolrCache.State.LIVE);
@@ -94,8 +94,8 @@ public class TestLRUCache extends Lucene
   
   @SuppressWarnings("unchecked")
   public void testNoAutowarm() throws IOException {
-    LRUCache<Object, Object> lruCache = new LRUCache<Object, Object>();
-    Map<String, String> params = new HashMap<String, String>();
+    LRUCache<Object, Object> lruCache = new LRUCache<>();
+    Map<String, String> params = new HashMap<>();
     params.put("size", "100");
     params.put("initialSize", "10");
     CacheRegenerator cr = new NoOpRegenerator();
@@ -111,7 +111,7 @@ public class TestLRUCache extends Lucene
     assertEquals(1L, nl.get("hits"));
     assertEquals(101L, nl.get("inserts"));
     assertEquals(null, lruCache.get(1));  // first item put in should be the first out
-    LRUCache<Object, Object> lruCacheNew = new LRUCache<Object, Object>();
+    LRUCache<Object, Object> lruCacheNew = new LRUCache<>();
     lruCacheNew.init(params, o, cr);
     lruCacheNew.warm(null, lruCache);
     lruCacheNew.setState(SolrCache.State.LIVE);

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java Wed Mar 12 18:14:05 2014
@@ -135,7 +135,7 @@ public class TestMaxScoreQueryParser ext
   private Query parse(String q, String... params) {
     try {
       ModifiableSolrParams p = new ModifiableSolrParams();
-      ArrayList<String> al = new ArrayList<String>(Arrays.asList(params));
+      ArrayList<String> al = new ArrayList<>(Arrays.asList(params));
       while(al.size() >= 2) {
         p.add(al.remove(0), al.remove(0));
       }

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java Wed Mar 12 18:14:05 2014
@@ -471,7 +471,7 @@ public class TestPseudoReturnFields exte
               ,"//result/doc[count(*)=6]"
               );
 
-      final List<String> params = new ArrayList<String>((fl.size()*2) + 4);
+      final List<String> params = new ArrayList<>((fl.size()*2) + 4);
       final StringBuilder info = new StringBuilder();
       params.addAll(Arrays.asList("q","*:*", "rows", "1"));
       for (String item : fl) {

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java Wed Mar 12 18:14:05 2014
@@ -55,8 +55,8 @@ public class TestRTGBase extends SolrTes
     }
   }
 
-  protected final ConcurrentHashMap<Integer,DocInfo> model = new ConcurrentHashMap<Integer,DocInfo>();
-  protected Map<Integer,DocInfo> committedModel = new HashMap<Integer,DocInfo>();
+  protected final ConcurrentHashMap<Integer,DocInfo> model = new ConcurrentHashMap<>();
+  protected Map<Integer,DocInfo> committedModel = new HashMap<>();
   protected long snapshotCount;
   protected long committedModelClock;
   protected volatile int lastId;

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRangeQuery.java Wed Mar 12 18:14:05 2014
@@ -88,7 +88,7 @@ public class TestRangeQuery extends Solr
     String[] dates = {"0299-12-31T23:59:59.999Z","2000-01-01T00:00:00.000Z","2000-01-01T00:00:00.001Z",  "0299-12-31T23:59:59.998Z","2000-01-01T00:00:00.002Z" };
 
     // fields that normal range queries should work on
-    Map<String,String[]> norm_fields = new HashMap<String,String[]>();
+    Map<String,String[]> norm_fields = new HashMap<>();
     norm_fields.put("foo_i", ints);
     norm_fields.put("foo_l", longs);
     norm_fields.put("foo_d", doubles);
@@ -103,7 +103,7 @@ public class TestRangeQuery extends Solr
 
 
     // fields that frange queries should work on
-    Map<String,String[]> frange_fields = new HashMap<String,String[]>();
+    Map<String,String[]> frange_fields = new HashMap<>();
     frange_fields.put("foo_i", ints);
     frange_fields.put("foo_l", longs);
     frange_fields.put("foo_d", doubles);
@@ -120,12 +120,12 @@ public class TestRangeQuery extends Solr
     frange_fields.put("foo_s", strings);
     frange_fields.put("foo_dt", dates);
 
-    Map<String,String[]> all_fields = new HashMap<String,String[]>();
+    Map<String,String[]> all_fields = new HashMap<>();
     all_fields.putAll(norm_fields);
     all_fields.putAll(frange_fields);
 
     for (int j=0; j<ints.length-2; j++) {
-      List<String> fields = new ArrayList<String>();
+      List<String> fields = new ArrayList<>();
       fields.add("id");
       fields.add(""+j);
       for (Map.Entry<String,String[]> entry : all_fields.entrySet()) {
@@ -239,7 +239,7 @@ public class TestRangeQuery extends Solr
       // lower=2; upper=2; inclusive=true;      
       // inclusive=true; lowerMissing=true; upperMissing=true;    
 
-      List<String> qs = new ArrayList<String>();
+      List<String> qs = new ArrayList<>();
       for (String field : norm_fields) {
         String q = field + ':' + (inclusive?'[':'{')
                 + (lowerMissing?"*":lower)

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java Wed Mar 12 18:14:05 2014
@@ -438,7 +438,7 @@ public class TestRealTimeGet extends Tes
 
     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) {
@@ -456,7 +456,7 @@ public class TestRealTimeGet extends Tes
                 long version;
 
                 synchronized(TestRealTimeGet.this) {
-                  newCommittedModel = new HashMap<Integer,DocInfo>(model);  // take a snapshot
+                  newCommittedModel = new HashMap<>(model);  // take a snapshot
                   version = snapshotCount++;
                   verbose("took snapshot version=",version);
                 }

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecovery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecovery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecovery.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecovery.java Wed Mar 12 18:14:05 2014
@@ -124,7 +124,7 @@ public class TestRecovery extends SolrTe
       clearIndex();
       assertU(commit());
 
-      Deque<Long> versions = new ArrayDeque<Long>();
+      Deque<Long> versions = new ArrayDeque<>();
       versions.addFirst(addAndGetVersion(sdoc("id", "A1"), null));
       versions.addFirst(addAndGetVersion(sdoc("id", "A11"), null));
       versions.addFirst(addAndGetVersion(sdoc("id", "A12"), null));
@@ -771,7 +771,7 @@ public class TestRecovery extends SolrTe
       int start = 0;
       int maxReq = 50;
 
-      LinkedList<Long> versions = new LinkedList<Long>();
+      LinkedList<Long> versions = new LinkedList<>();
       addDocs(10, start, versions); start+=10;
       assertJQ(req("qt","/get", "getVersions",""+maxReq), "/versions==" + versions.subList(0,Math.min(maxReq,start)));
       assertU(commit());

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java Wed Mar 12 18:14:05 2014
@@ -154,7 +154,7 @@ public class TestRecoveryHdfs extends So
       clearIndex();
       assertU(commit());
 
-      Deque<Long> versions = new ArrayDeque<Long>();
+      Deque<Long> versions = new ArrayDeque<>();
       versions.addFirst(addAndGetVersion(sdoc("id", "A1"), null));
       versions.addFirst(addAndGetVersion(sdoc("id", "A11"), null));
       versions.addFirst(addAndGetVersion(sdoc("id", "A12"), null));
@@ -768,7 +768,7 @@ public class TestRecoveryHdfs extends So
       int start = 0;
       int maxReq = 50;
 
-      LinkedList<Long> versions = new LinkedList<Long>();
+      LinkedList<Long> versions = new LinkedList<>();
       addDocs(10, start, versions); start+=10;
       assertJQ(req("qt","/get", "getVersions",""+maxReq), "/versions==" + versions.subList(0,Math.min(maxReq,start)));
       assertU(commit());

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSearchPerf.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSort.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSort.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestSort.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressLucene.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressLucene.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressLucene.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressLucene.java Wed Mar 12 18:14:05 2014
@@ -78,7 +78,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();
@@ -142,7 +142,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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressRecovery.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressReorder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressReorder.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressReorder.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressReorder.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressUserVersions.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressVersions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressVersions.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressVersions.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/TestStressVersions.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java Wed Mar 12 18:14:05 2014
@@ -46,7 +46,7 @@ public class BJQParserTest extends SolrT
     int i = 0;
     List<List<String[]>> blocks = createBlocks();
     for (List<String[]> block : blocks) {
-      List<XmlDoc> updBlock = new ArrayList<XmlDoc>();
+      List<XmlDoc> updBlock = new ArrayList<>();
       
       for (String[] doc : block) {
         String[] idDoc = Arrays.copyOf(doc,doc.length+2);
@@ -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/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java Wed Mar 12 18:14:05 2014
@@ -41,7 +41,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);
     
     TokenStream ts = null;

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/AutoCommitTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/SolrCmdDistributorTest.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/TestDocBasedVersionConstraints.java Wed Mar 12 18:14:05 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/branches/branch_4x/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java?rev=1576837&r1=1576836&r2=1576837&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java Wed Mar 12 18:14:05 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", 



Mime
View raw message