Use ReusableNormalizedNodePruner in PruningDataTreeModification
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / selectionstrategy / LeastLoadedCandidateSelectionStrategy.java
index 9db7b0b805a55b9c2f5161f60f3c3fe6d898bc2c..7102cbbbf096be52bcc1656b39e162e6ce7bf796 100644 (file)
@@ -15,6 +15,7 @@ import com.google.common.base.Strings;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
+import javax.annotation.Nullable;
 
 /**
  * The LeastLoadedCandidateSelectionStrategy assigns ownership for an entity to the candidate which owns the least
@@ -30,7 +31,7 @@ public class LeastLoadedCandidateSelectionStrategy extends AbstractEntityOwnerSe
     }
 
     @Override
-    public String newOwner(String currentOwner, Collection<String> viableCandidates) {
+    public String newOwner(@Nullable String currentOwner, Collection<String> viableCandidates) {
         Preconditions.checkArgument(viableCandidates.size() > 0);
         String leastLoadedCandidate = null;
         long leastLoadedCount = Long.MAX_VALUE;