X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fentityownership%2Fselectionstrategy%2FLeastLoadedCandidateSelectionStrategy.java;h=f508ad158906a9094758c7955f913121d34ec854;hp=9db7b0b805a55b9c2f5161f60f3c3fe6d898bc2c;hb=refs%2Fchanges%2F76%2F69876%2F11;hpb=ccf45ec33a4b08b2fa7abe8fb078658cbadb0e7c diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/LeastLoadedCandidateSelectionStrategy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/LeastLoadedCandidateSelectionStrategy.java index 9db7b0b805..f508ad1589 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/LeastLoadedCandidateSelectionStrategy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/LeastLoadedCandidateSelectionStrategy.java @@ -12,9 +12,11 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 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 +32,9 @@ public class LeastLoadedCandidateSelectionStrategy extends AbstractEntityOwnerSe } @Override - public String newOwner(String currentOwner, Collection viableCandidates) { + @SuppressFBWarnings(value = "NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE", + justification = "Unrecognised NullableDecl") + public String newOwner(@Nullable String currentOwner, Collection viableCandidates) { Preconditions.checkArgument(viableCandidates.size() > 0); String leastLoadedCandidate = null; long leastLoadedCount = Long.MAX_VALUE;