Make potentially-static methods static 20/38320/2
authorRobert Varga <rovarga@cisco.com>
Tue, 3 May 2016 11:54:17 +0000 (13:54 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 9 May 2016 09:06:45 +0000 (09:06 +0000)
Change-Id: Ifcb3541dced996f106a3ca4fdf5bfa52130eb6ab
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/TestDriver.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotTest.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePruner.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/ConcurrentDOMDataBroker.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/LeastLoadedCandidateSelectionStrategyTest.java

index 9aa6f75..74ded5f 100644 (file)
@@ -134,7 +134,7 @@ public class TestDriver {
     }
 
     // create the listener using a separate actor system for each example actor
-    private void createClusterRoleChangeListener(List<String> memberIds) {
+    private static void createClusterRoleChangeListener(List<String> memberIds) {
         System.out.println("memberIds="+memberIds);
         for (String memberId : memberIds) {
             ActorRef listenerActor = listenerActorSystem.actorOf(
index b2d518e..1d60158 100644 (file)
@@ -68,7 +68,7 @@ public class InstallSnapshotTest {
         assertEquals("isSerializedType", false, InstallSnapshot.isSerializedType(new Object()));
     }
 
-    private void verifyInstallSnapshot(InstallSnapshot expected, InstallSnapshot actual) {
+    private static void verifyInstallSnapshot(InstallSnapshot expected, InstallSnapshot actual) {
         assertEquals("getTerm", expected.getTerm(), actual.getTerm());
         assertEquals("getChunkIndex", expected.getChunkIndex(), actual.getChunkIndex());
         assertEquals("getTotalChunks", expected.getTotalChunks(), actual.getTotalChunks());
index 03fb641..91d323e 100644 (file)
@@ -243,7 +243,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
         Preconditions.checkState(!sealed, "Pruner can be used only once");
     }
 
-    private boolean hasValidSchema(QName name, NormalizedNodeBuilderWrapper parent) {
+    private static boolean hasValidSchema(QName name, NormalizedNodeBuilderWrapper parent) {
         boolean valid = parent.getSchema().isPresent() && parent.getSchema().get().getChild(name) != null;
         if(!valid) {
             LOG.debug("Schema not found for {}", name);
index 02362b9..4794e2a 100644 (file)
@@ -340,7 +340,7 @@ public class ConcurrentDOMDataBroker extends AbstractDOMBroker implements DOMDat
         throw new UnsupportedOperationException("Commit cohort is not supported for " + path);
     }
 
-    private LogicalDatastoreType toLegacy(org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType) {
+    private static LogicalDatastoreType toLegacy(org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType) {
         switch (datastoreType) {
             case CONFIGURATION:
                 return LogicalDatastoreType.CONFIGURATION;
index d0cd32f..d8c3b4b 100644 (file)
@@ -79,7 +79,7 @@ public class LeastLoadedCandidateSelectionStrategyTest {
         return viableCandidates;
     }
 
-    private void assertStatistics(Map<String, Long> statistics, long... count){
+    private static void assertStatistics(Map<String, Long> statistics, long... count){
         for(int i=0;i<count.length;i++){
             assertEquals(count[i], (long) statistics.get("member-" + (i+1)));
         }