You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2015/05/05 06:55:31 UTC

svn commit: r1677741 - /lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/rule/RuleEngineTest.java

Author: shalin
Date: Tue May  5 04:55:30 2015
New Revision: 1677741

URL: http://svn.apache.org/r1677741
Log:
SOLR-6220: Fix compile error on Java7

Modified:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/rule/RuleEngineTest.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/rule/RuleEngineTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/rule/RuleEngineTest.java?rev=1677741&r1=1677740&r2=1677741&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/rule/RuleEngineTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/rule/RuleEngineTest.java Tue May  5 04:55:30 2015
@@ -71,13 +71,13 @@ public class RuleEngineTest extends Solr
     Map<Position, String> mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null ).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null ).getNodeMappings();
     assertNotNull(mapping);
 
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null ).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null ).getNodeMappings();
     assertNotNull(mapping);
 
 
@@ -117,7 +117,7 @@ public class RuleEngineTest extends Solr
     Map<Position, String> mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
     assertNotNull(mapping);
     assertFalse(mapping.containsValue("127.0.0.1:49947_"));
 
@@ -129,7 +129,7 @@ public class RuleEngineTest extends Solr
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
     assertNull(mapping);
 
 
@@ -141,7 +141,7 @@ public class RuleEngineTest extends Solr
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
     assertNotNull(mapping);
     assertFalse(mapping.containsValue("127.0.0.2:49958_"));
 
@@ -153,7 +153,7 @@ public class RuleEngineTest extends Solr
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
     assertNotNull(mapping);
 
     rules = parseRules(
@@ -164,7 +164,7 @@ public class RuleEngineTest extends Solr
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
     assertNull(mapping);
 
     rules = parseRules(
@@ -175,7 +175,7 @@ public class RuleEngineTest extends Solr
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null, null).getNodeMappings();
     assertNotNull(mapping);
 
 
@@ -206,14 +206,14 @@ public class RuleEngineTest extends Solr
     Map<Position, String> mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null ,null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null ,null).getNodeMappings();
     assertNull(mapping);
     rulesStr = "rack:*,replica:<2~";
     rules = parse(Arrays.asList(rulesStr));
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null ,null).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null ,null).getNodeMappings();
     assertNotNull(mapping);
 
     rulesStr = "rack:*,shard:*,replica:<2";//for each shard there can be a max of 1 replica
@@ -221,7 +221,7 @@ public class RuleEngineTest extends Solr
     mapping = new ReplicaAssigner(
         rules,
         shardVsReplicaCount, Collections.singletonList(MockSnitch.class.getName()),
-        new HashMap(), new ArrayList<>(MockSnitch.nodeVsTags.keySet()), null,null ).getNodeMappings();
+        new HashMap(), new ArrayList<String>(MockSnitch.nodeVsTags.keySet()), null,null ).getNodeMappings();
     assertNotNull(mapping);
   }