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 5b49bd7..d2d39be 100644 (file)
@@ -42,7 +42,7 @@ public class BackwardsCompatibleNotificationBrokerTest extends AbstractNotificat
                 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();
index 1665bef..da18ae2 100644 (file)
@@ -50,7 +50,7 @@ public class Bug1333DataChangeListenerTest extends AbstractDataTreeChangeListene
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
 
-    private Top topWithListItem() {
+    private static Top topWithListItem() {
         return top(topLevelList(TOP_FOO_KEY, complexUsesAugment(USES_ONE_KEY, USES_TWO_KEY)));
     }
 
index 91d86c1..8887be0 100644 (file)
@@ -183,7 +183,7 @@ public class DataTreeChangeListenerTest extends AbstractConcurrentDataBrokerTest
         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());
index 143cb8e..5f34e9a 100644 (file)
@@ -160,7 +160,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataTreeChangeL
         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),
index 3108ee6..282330d 100644 (file)
@@ -58,7 +58,7 @@ public class ShardDataTreeListenerInfoMXBeanImpl extends AbstractMXBean implemen
     }
 
     @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) {
index 38a89d0..a113856 100644 (file)
@@ -82,7 +82,7 @@ public class DatastoreContextContextPropertiesUpdaterTest {
         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);
index 8475b28..e86e93a 100644 (file)
@@ -87,7 +87,7 @@ public class ShardedDOMDataBrokerDelegatingReadWriteTransactionTest {
         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));
@@ -96,11 +96,11 @@ public class ShardedDOMDataBrokerDelegatingReadWriteTransactionTest {
         return outer.build();
     }
 
-    private NormalizedNode<?, ?> testNodeWithOuter(int... ids) {
+    private static NormalizedNode<?, ?> testNodeWithOuter(int... 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();

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.