Enable checkstyle rule to verify method names
Enabled checkstyle rule "MethodName" which checks
if method names adhere to a naming convention and
fixed the violations it found.
Change-Id: I87448a1fa857e78f33c42090d485bf21a8986ba7
diff --git a/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java b/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java
index 39e7e9f..913012d 100644
--- a/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java
+++ b/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java
@@ -93,7 +93,7 @@
@Test
public void testVERSION_NONEXISTENT() {
- assertEquals(HZClient.VERSION_NONEXISTENT, table.VERSION_NONEXISTENT());
+ assertEquals(HZClient.VERSION_NONEXISTENT, table.getVersionNonexistant());
}
@Test
diff --git a/src/test/java/net/onrc/onos/core/datastore/topology/KVSwitchTest.java b/src/test/java/net/onrc/onos/core/datastore/topology/KVSwitchTest.java
index ba25903..a789f1c 100644
--- a/src/test/java/net/onrc/onos/core/datastore/topology/KVSwitchTest.java
+++ b/src/test/java/net/onrc/onos/core/datastore/topology/KVSwitchTest.java
@@ -40,7 +40,7 @@
try {
final KVSwitch sw = new KVSwitch(dpid);
sw.read();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertEquals(dpid, sw.getDpid());
assertEquals(status, sw.getStatus());
return sw;
@@ -67,7 +67,7 @@
KVSwitch sw = new KVSwitch(dpid);
sw.setStatus(STATUS.ACTIVE);
sw.create();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
expected.put(sw.getDpid(), sw);
}
@@ -88,7 +88,7 @@
public void testCreate() throws ObjectExistsException {
sw1.setStatus(STATUS.ACTIVE);
sw1.create();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
assertEquals(dpid1, sw1.getDpid());
assertEquals(STATUS.ACTIVE, sw1.getStatus());
@@ -101,7 +101,7 @@
// setup pre-existing Switch
KVSwitch sw = new KVSwitch(dpid1);
sw.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertSwitchInDataStore(dpid1, STATUS.INACTIVE);
sw1.setStatus(STATUS.ACTIVE);
@@ -114,13 +114,13 @@
// setup pre-existing Switch
KVSwitch sw = new KVSwitch(dpid1);
sw.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertSwitchInDataStore(dpid1, STATUS.INACTIVE);
sw1.setStatus(STATUS.ACTIVE);
sw1.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
assertEquals(dpid1, sw1.getDpid());
assertEquals(STATUS.ACTIVE, sw1.getStatus());
@@ -133,11 +133,11 @@
KVSwitch sw = new KVSwitch(dpid1);
sw.setStatus(STATUS.ACTIVE);
sw.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertSwitchInDataStore(dpid1, STATUS.ACTIVE);
sw1.read();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
assertEquals(sw.getVersion(), sw1.getVersion());
assertEquals(dpid1, sw1.getDpid());
assertEquals(STATUS.ACTIVE, sw1.getStatus());
@@ -156,16 +156,16 @@
KVSwitch sw = new KVSwitch(dpid1);
sw.setStatus(STATUS.ACTIVE);
sw.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertSwitchInDataStore(dpid1, STATUS.ACTIVE);
sw1.read();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
sw1.setStatus(STATUS.INACTIVE);
sw1.update();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
assertNotEquals(sw.getVersion(), sw1.getVersion());
assertEquals(dpid1, sw1.getDpid());
assertEquals(STATUS.INACTIVE, sw1.getStatus());
@@ -177,7 +177,7 @@
KVSwitch sw = new KVSwitch(dpid1);
sw.setStatus(STATUS.ACTIVE);
sw.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertSwitchInDataStore(dpid1, STATUS.ACTIVE);
@@ -186,7 +186,7 @@
} catch (ObjectDoesntExistException e) {
fail("Failed reading switch to delete");
}
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
sw1.delete();
assertSwitchNotInDataStore(dpid1);
}
@@ -197,12 +197,12 @@
KVSwitch sw = new KVSwitch(dpid1);
sw.setStatus(STATUS.ACTIVE);
sw.forceCreate();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw.getVersion());
assertSwitchInDataStore(dpid1, STATUS.ACTIVE);
sw1.forceDelete();
- assertNotEquals(DataStoreClient.getClient().VERSION_NONEXISTENT(), sw1.getVersion());
+ assertNotEquals(DataStoreClient.getClient().getVersionNonexistant(), sw1.getVersion());
}
}
diff --git a/src/test/java/net/onrc/onos/core/datastore/topology/KVTopologyTest.java b/src/test/java/net/onrc/onos/core/datastore/topology/KVTopologyTest.java
index d9c2478..ce647a4 100644
--- a/src/test/java/net/onrc/onos/core/datastore/topology/KVTopologyTest.java
+++ b/src/test/java/net/onrc/onos/core/datastore/topology/KVTopologyTest.java
@@ -34,7 +34,7 @@
public class KVTopologyTest {
- static final long VERSION_NONEXISTENT = DataStoreClient.getClient().VERSION_NONEXISTENT();
+ static final long VERSION_NONEXISTENT = DataStoreClient.getClient().getVersionNonexistant();
private static final byte[] DEVICE2_MAC_SW2P2 = new byte[]{6, 5, 4, 3, 2, 1, 0};