SOLR-10790: Fix warnings in Assign.java and ReplicaAssigner.java classes.

This commit is contained in:
Christine Poerschke 2017-06-02 10:39:18 +01:00
parent 72ba34f66c
commit cccf97cae8
3 changed files with 5 additions and 2 deletions

View File

@ -298,6 +298,9 @@ Other Changes
* SOLR-10741: Factor out createSliceShardsStr method from HttpShardHandler.prepDistributed.
(Domenico Fabio Marino via Christine Poerschke)
* SOLR-10790: Fix warnings in Assign.java and ReplicaAssigner.java classes.
(Christine Poerschke)
================== 6.6.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -98,7 +98,7 @@ public class Assign {
map.put(shardId, cnt);
}
Collections.sort(shardIdNames, (o1, o2) -> {
Collections.sort(shardIdNames, (String o1, String o2) -> {
Integer one = map.get(o1);
Integer two = map.get(o2);
return one.compareTo(two);

View File

@ -211,7 +211,7 @@ public class ReplicaAssigner {
int startPosition = 0;
Map<String, Map<String, Integer>> copyOfCurrentState = getDeepCopy(shardVsNodes, 2);
List<String> sortedLiveNodes = new ArrayList<>(this.participatingLiveNodes);
Collections.sort(sortedLiveNodes, (n1, n2) -> {
Collections.sort(sortedLiveNodes, (String n1, String n2) -> {
int result1 = 0;
for (int i = 0; i < rulePermutation.length; i++) {
Rule rule = rules.get(rulePermutation[i]);