Make private methods static 62/82862/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 1 Jul 2019 12:12:48 +0000 (14:12 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 1 Jul 2019 12:13:20 +0000 (14:13 +0200)
Eclipse is flagging a number of methods as potentially-static,
make sure we mark them as such.

Change-Id: I4254dd29716f4365d71f81c3f3a0e7a9590d9801
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/BackwardsCompatibleNotificationBrokerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug1333DataChangeListenerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/DataTreeChangeListenerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ListInsertionDataChangeListenerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardDataTreeListenerInfoMXBeanImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextContextPropertiesUpdaterTest.java
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransactionTest.java

index 5b49bd787322a839c13d4af2777ce7e3b4414b3a..d2d39be030c958e8785e457183f843c4b05808b5 100644 (file)
@@ -42,7 +42,7 @@ public class BackwardsCompatibleNotificationBrokerTest extends AbstractNotificat
                 notificationService);
     }
 
                 notificationService);
     }
 
-    private TwoLevelListChanged createTestData() {
+    private static TwoLevelListChanged createTestData() {
         final TwoLevelListChangedBuilder tb = new TwoLevelListChangedBuilder();
         tb.setTopLevelList(ImmutableList.of(new TopLevelListBuilder().withKey(new TopLevelListKey("test")).build()));
         return tb.build();
         final TwoLevelListChangedBuilder tb = new TwoLevelListChangedBuilder();
         tb.setTopLevelList(ImmutableList.of(new TopLevelListBuilder().withKey(new TopLevelListKey("test")).build()));
         return tb.build();
index 1665bef48b79c73a97f2001f25b1354fc3ba1206..da18ae2a612eec649d09bbea40f6ab400b821ff1 100644 (file)
@@ -50,7 +50,7 @@ public class Bug1333DataChangeListenerTest extends AbstractDataTreeChangeListene
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
 
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
 
-    private Top topWithListItem() {
+    private static Top topWithListItem() {
         return top(topLevelList(TOP_FOO_KEY, complexUsesAugment(USES_ONE_KEY, USES_TWO_KEY)));
     }
 
         return top(topLevelList(TOP_FOO_KEY, complexUsesAugment(USES_ONE_KEY, USES_TWO_KEY)));
     }
 
index 91d86c1d5907e34a181ea383b47442f602e82c45..8887be0a6410383e5d1cf52b9f28d61d381ccf8e 100644 (file)
@@ -183,7 +183,7 @@ public class DataTreeChangeListenerTest extends AbstractConcurrentDataBrokerTest
         assertEquals(TOP_INITIAL_DATA, initialNode.getDataAfter());
     }
 
         assertEquals(TOP_INITIAL_DATA, initialNode.getDataAfter());
     }
 
-    private void verifyModification(final DataObjectModification<? extends DataObject> barWrite,
+    private static void verifyModification(final DataObjectModification<? extends DataObject> barWrite,
             final PathArgument pathArg, final ModificationType eventType) {
         assertEquals(pathArg.getType(), barWrite.getDataType());
         assertEquals(eventType,barWrite.getModificationType());
             final PathArgument pathArg, final ModificationType eventType) {
         assertEquals(pathArg.getType(), barWrite.getDataType());
         assertEquals(eventType,barWrite.getModificationType());
index 143cb8e1cbb52bb9e4c58acda8e4fc673e820795..5f34e9a1ac7b1b79470f0aa333cde5a290404aa5 100644 (file)
@@ -160,7 +160,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataTreeChangeL
         barListener.verify();
     }
 
         barListener.verify();
     }
 
-    private Function<DataTreeModification<Top>, Boolean> topSubtreeModified(final TopLevelList topFoo,
+    private static Function<DataTreeModification<Top>, Boolean> topSubtreeModified(final TopLevelList topFoo,
             final TopLevelList topBar) {
         return match(ModificationType.SUBTREE_MODIFIED, TOP,
             (Function<Top, Boolean>) dataBefore -> Objects.equals(top(topFoo), dataBefore),
             final TopLevelList topBar) {
         return match(ModificationType.SUBTREE_MODIFIED, TOP,
             (Function<Top, Boolean>) dataBefore -> Objects.equals(top(topFoo), dataBefore),
index 3108ee681c16e14bf1904d1bce258485e003471f..282330d7a31d4fbfc5f71bd87144e2d4e28dc6f0 100644 (file)
@@ -58,7 +58,7 @@ public class ShardDataTreeListenerInfoMXBeanImpl extends AbstractMXBean implemen
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    private List<DataTreeListenerInfo> getListenerActorsInfo(Collection<ActorSelection> actors) {
+    private static List<DataTreeListenerInfo> getListenerActorsInfo(Collection<ActorSelection> actors) {
         final Timeout timeout = new Timeout(20, TimeUnit.SECONDS);
         final List<Future<Object>> futureList = new ArrayList<>(actors.size());
         for (ActorSelection actor: actors) {
         final Timeout timeout = new Timeout(20, TimeUnit.SECONDS);
         final List<Future<Object>> futureList = new ArrayList<>(actors.size());
         for (ActorSelection actor: actors) {
index 38a89d0c75fa7fe0feb56302e5443c4a3bd814ba..a113856627e7ca0ddf70c6cc72ac1d747e678478 100644 (file)
@@ -82,7 +82,7 @@ public class DatastoreContextContextPropertiesUpdaterTest {
         updater.close();
     }
 
         updater.close();
     }
 
-    private Object resolveField(final String name, final Object obj) throws Exception {
+    private static Object resolveField(final String name, final Object obj) throws Exception {
         final Field currProps = obj.getClass().getDeclaredField(name);
         currProps.setAccessible(true);
         return currProps.get(obj);
         final Field currProps = obj.getClass().getDeclaredField(name);
         currProps.setAccessible(true);
         return currProps.get(obj);
index 8475b284b21b430f6de3a0139a31096e867fac7b..e86e93a12c1bb30424a7170429a502b95add7c72 100644 (file)
@@ -87,7 +87,7 @@ public class ShardedDOMDataBrokerDelegatingReadWriteTransactionTest {
         assertEquals(Optional.absent(), rwTx.read(LogicalDatastoreType.OPERATIONAL, TestModel.TEST_PATH).checkedGet());
     }
 
         assertEquals(Optional.absent(), rwTx.read(LogicalDatastoreType.OPERATIONAL, TestModel.TEST_PATH).checkedGet());
     }
 
-    private DataContainerChild<?, ?> outerNode(int... ids) {
+    private static DataContainerChild<?, ?> outerNode(int... ids) {
         CollectionNodeBuilder<MapEntryNode, MapNode> outer = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME);
         for (int id : ids) {
             outer.addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, id));
         CollectionNodeBuilder<MapEntryNode, MapNode> outer = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME);
         for (int id : ids) {
             outer.addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, id));
@@ -96,11 +96,11 @@ public class ShardedDOMDataBrokerDelegatingReadWriteTransactionTest {
         return outer.build();
     }
 
         return outer.build();
     }
 
-    private NormalizedNode<?, ?> testNodeWithOuter(int... ids) {
+    private static NormalizedNode<?, ?> testNodeWithOuter(int... ids) {
         return testNodeWithOuter(outerNode(ids));
     }
 
         return testNodeWithOuter(outerNode(ids));
     }
 
-    private NormalizedNode<?, ?> testNodeWithOuter(DataContainerChild<?, ?> outer) {
+    private static NormalizedNode<?, ?> testNodeWithOuter(DataContainerChild<?, ?> outer) {
         return ImmutableContainerNodeBuilder.create()
                 .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)).withChild(outer)
                 .build();
         return ImmutableContainerNodeBuilder.create()
                 .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)).withChild(outer)
                 .build();