Enable checkstyle rue to check formal parameter names.
Enable "ParameterName" checkstyle rule to enforce consistent naming
of formal parameters and fix violations that this rue detects.
Change-Id: I5f7f5de469a9b803d082cbe475aff79eb2fe38f2
diff --git a/src/main/java/net/onrc/onos/core/datastore/topology/KVLink.java b/src/main/java/net/onrc/onos/core/datastore/topology/KVLink.java
index ed1f306..2e4d079 100644
--- a/src/main/java/net/onrc/onos/core/datastore/topology/KVLink.java
+++ b/src/main/java/net/onrc/onos/core/datastore/topology/KVLink.java
@@ -75,10 +75,10 @@
private final SwitchPort dst;
private STATUS status;
- public static byte[] getLinkID(final Long src_dpid, final Long src_port_no,
- final Long dst_dpid, final Long dst_port_no) {
- return LinkEvent.getLinkID(src_dpid, src_port_no, dst_dpid,
- dst_port_no).array();
+ public static byte[] getLinkID(final Long srcDpid, final Long srcPortNo,
+ final Long dstDpid, final Long dstPortNo) {
+ return LinkEvent.getLinkID(srcDpid, srcPortNo, dstDpid,
+ dstPortNo).array();
}
public static long[] getLinkTupleFromKey(final byte[] key) {
@@ -102,13 +102,13 @@
return tuple;
}
- public KVLink(final Long src_dpid, final Long src_port_no,
- final Long dst_dpid, final Long dst_port_no) {
- super(DataStoreClient.getClient().getTable(GLOBAL_LINK_TABLE_NAME), getLinkID(src_dpid,
- src_port_no, dst_dpid, dst_port_no));
+ public KVLink(final Long srcDpid, final Long srcPortNo,
+ final Long dstDpid, final Long dstPortNo) {
+ super(DataStoreClient.getClient().getTable(GLOBAL_LINK_TABLE_NAME), getLinkID(srcDpid,
+ srcPortNo, dstDpid, dstPortNo));
- src = new SwitchPort(src_dpid, src_port_no);
- dst = new SwitchPort(dst_dpid, dst_port_no);
+ src = new SwitchPort(srcDpid, srcPortNo);
+ dst = new SwitchPort(dstDpid, dstPortNo);
status = STATUS.INACTIVE;
}
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
index 48b2a60..18a5753 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -360,10 +360,10 @@
*
* @param sw Switch to which messages will be sent.
* @param queue Queue of messages.
- * @param max_msg Limitation of number of messages to be sent. If set to 0,
+ * @param maxMsg Limitation of number of messages to be sent. If set to 0,
* all messages in queue will be sent.
*/
- private void processQueue(IOFSwitch sw, SwitchQueue queue, int max_msg) {
+ private void processQueue(IOFSwitch sw, SwitchQueue queue, int maxMsg) {
// check sending rate and determine it to be sent or not
long currentTime = System.currentTimeMillis();
long size = 0;
@@ -372,7 +372,7 @@
int i = 0;
while (queue.hasMessageToSend()) {
// Number of messages excess the limit
- if (0 < max_msg && max_msg <= i) {
+ if (0 < maxMsg && maxMsg <= i) {
break;
}
++i;
@@ -430,13 +430,13 @@
/**
* Initialize object with threads of given number.
*
- * @param number_thread Number of threads to handle messages.
+ * @param numberThreadValue Number of threads to handle messages.
*/
- public FlowPusher(int number_thread) {
- if (number_thread > 0) {
- this.numberThread = number_thread;
+ public FlowPusher(int numberThreadValue) {
+ if (numberThreadValue > 0) {
+ numberThread = numberThreadValue;
} else {
- this.numberThread = DEFAULT_NUMBER_THREAD;
+ numberThread = DEFAULT_NUMBER_THREAD;
}
}
diff --git a/src/main/java/net/onrc/onos/core/topology/LinkEvent.java b/src/main/java/net/onrc/onos/core/topology/LinkEvent.java
index fbf686a..40d7400 100644
--- a/src/main/java/net/onrc/onos/core/topology/LinkEvent.java
+++ b/src/main/java/net/onrc/onos/core/topology/LinkEvent.java
@@ -22,10 +22,10 @@
dst = null;
}
- public LinkEvent(Long src_dpid, Long src_port_no, Long dst_dpid,
- Long dst_port_no) {
- src = new SwitchPort(src_dpid, src_port_no);
- dst = new SwitchPort(dst_dpid, dst_port_no);
+ public LinkEvent(Long srcDpid, Long srcPortNo, Long dstDpid,
+ Long dstPortNo) {
+ src = new SwitchPort(srcDpid, srcPortNo);
+ dst = new SwitchPort(dstDpid, dstPortNo);
}
public LinkEvent(Link link) {
@@ -50,11 +50,11 @@
public static final int LINKID_BYTES = 2 + PortEvent.PORTID_BYTES * 2;
- public static ByteBuffer getLinkID(Long src_dpid, Long src_port_no,
- Long dst_dpid, Long dst_port_no) {
+ public static ByteBuffer getLinkID(Long srcDpid, Long srcPortNo,
+ Long dstDpid, Long dstPortNo) {
return (ByteBuffer) ByteBuffer.allocate(LinkEvent.LINKID_BYTES).putChar('L')
- .put(PortEvent.getPortID(src_dpid, src_port_no))
- .put(PortEvent.getPortID(dst_dpid, dst_port_no)).flip();
+ .put(PortEvent.getPortID(srcDpid, srcPortNo))
+ .put(PortEvent.getPortID(dstDpid, dstPortNo)).flip();
}
public byte[] getID() {