Mark static methods 25/92325/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 30 Aug 2020 20:25:38 +0000 (22:25 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 30 Aug 2020 20:26:17 +0000 (22:26 +0200)
A few methods do not impact object state, make them static to
clarify that (and remove related Eclipse warnings).

Change-Id: Id9c52121c34c9d3d5c43bf256f557d682aa93371
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
applications/arbitratorreconciliation/impl/src/main/java/org/opendaylight/openflowplugin/applications/arbitratorreconciliation/impl/ArbitratorReconciliationManagerImpl.java

index e3600eafa0f09bcd171981c4e0850ee40ae77ddd..8042b308524ec7dcbefaffea81d2ec2318d0d0f7 100644 (file)
@@ -173,7 +173,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS
                         MoreExecutors.directExecutor());
                 return Futures.transform(
                         rpcResult,
-                        this.createRpcResultCondenser("committed active bundle"),
+                        createRpcResultCondenser("committed active bundle"),
                         MoreExecutors.directExecutor());
             }
         }
@@ -249,7 +249,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS
 
     @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
             justification = "https://github.com/spotbugs/spotbugs/issues/811")
-    private Messages createMessages(final NodeRef nodeRef) {
+    private static Messages createMessages(final NodeRef nodeRef) {
         final List<Message> messages = new ArrayList<>();
         messages.add(new MessageBuilder()
                 .setNode(nodeRef)
@@ -349,7 +349,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS
         }
     }
 
-    private <D> Function<RpcResult<D>,
+    private static <D> Function<RpcResult<D>,
             RpcResult<CommitActiveBundleOutput>> createRpcResultCondenser(final String action) {
         return input -> {
             final RpcResultBuilder<CommitActiveBundleOutput> resultSink;
@@ -406,7 +406,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS
 
     @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
             justification = "https://github.com/spotbugs/spotbugs/issues/811")
-    private Uint64 getDpnIdFromNodeName(String nodeName) {
+    private static Uint64 getDpnIdFromNodeName(String nodeName) {
         String dpnId = nodeName.substring(nodeName.lastIndexOf(SEPARATOR) + 1);
         return Uint64.valueOf(dpnId);
     }