Fixed javadoc warnings in slew of legacy code. We need to keep up on this; the old stuff is pretty sloppy.
diff --git a/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OFChannelHandler.java b/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OFChannelHandler.java
index c85eb21..bcbbd26 100644
--- a/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OFChannelHandler.java
+++ b/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/OFChannelHandler.java
@@ -632,7 +632,7 @@
* @param m The OFMessage that has just been received
* @param details A string giving more details about the exact nature
* of the problem.
- * @return
+ * @return display string
*/
// needs to be protected because enum members are actually subclasses
protected String getSwitchStateMessage(OFChannelHandler h,
@@ -682,7 +682,7 @@
/**
* Log an OpenFlow error message from a switch.
- * @param sw The switch that sent the error
+ * @param h The switch that sent the error
* @param error The error message
*/
@LogMessageDoc(level = "ERROR",
@@ -1185,7 +1185,7 @@
/**
* Return a string describing this switch based on the already available
* information (DPID and/or remote socket).
- * @return
+ * @return display string
*/
private String getSwitchInfoString() {
if (sw != null) {
diff --git a/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/RoleManager.java b/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/RoleManager.java
index f2e9581..ee3a37f 100644
--- a/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/RoleManager.java
+++ b/of/ctl/src/main/java/org/onlab/onos/of/controller/impl/RoleManager.java
@@ -69,7 +69,6 @@
* Send NX role request message to the switch requesting the specified
* role.
*
- * @param sw switch to send the role request message to
* @param role role to request
*/
private int sendNxRoleRequest(RoleState role) throws IOException {
@@ -318,8 +317,7 @@
* Extract the role from an OFVendor message if the message is a
* Nicira role reply. Otherwise return null.
*
- * @param h The channel handler receiving the message
- * @param vendorMessage The vendor message to parse.
+ * @param experimenterMsg message
* @return The role in the message if the message is a Nicira role
* reply, null otherwise.
* @throws SwitchStateException If the message is a Nicira role reply
@@ -363,7 +361,7 @@
/**
* Extract the role information from an OF1.3 Role Reply Message.
- * @param h
+ *
* @param rrmsg the role message
* @return RoleReplyInfo object
* @throws SwitchStateException if the role information could not be extracted.
diff --git a/tools/build/conf/src/main/resources/onos/suppressions.xml b/tools/build/conf/src/main/resources/onos/suppressions.xml
index 44943a9..212e66d 100644
--- a/tools/build/conf/src/main/resources/onos/suppressions.xml
+++ b/tools/build/conf/src/main/resources/onos/suppressions.xml
@@ -22,4 +22,3 @@
<suppress files=".java" checks="NewlineAtEndOfFile"/>
</suppressions>
-
diff --git a/utils/misc/src/main/java/org/onlab/packet/ARP.java b/utils/misc/src/main/java/org/onlab/packet/ARP.java
index f5f52c4..4d3e02f 100644
--- a/utils/misc/src/main/java/org/onlab/packet/ARP.java
+++ b/utils/misc/src/main/java/org/onlab/packet/ARP.java
@@ -67,7 +67,7 @@
}
/**
- * @param hardwareType
+ * @param hwType
* the hardwareType to set
*/
public ARP setHardwareType(final short hwType) {
@@ -83,7 +83,7 @@
}
/**
- * @param protocolType
+ * @param protoType
* the protocolType to set
*/
public ARP setProtocolType(final short protoType) {
@@ -115,7 +115,7 @@
}
/**
- * @param protocolAddressLength
+ * @param protoAddressLength
* the protocolAddressLength to set
*/
public ARP setProtocolAddressLength(final byte protoAddressLength) {
@@ -131,7 +131,7 @@
}
/**
- * @param opCode
+ * @param op
* the opCode to set
*/
public ARP setOpCode(final short op) {
@@ -147,7 +147,7 @@
}
/**
- * @param senderHardwareAddress
+ * @param senderHWAddress
* the senderHardwareAddress to set
*/
public ARP setSenderHardwareAddress(final byte[] senderHWAddress) {
@@ -163,7 +163,7 @@
}
/**
- * @param senderProtocolAddress
+ * @param senderProtoAddress
* the senderProtocolAddress to set
*/
public ARP setSenderProtocolAddress(final byte[] senderProtoAddress) {
@@ -185,7 +185,7 @@
}
/**
- * @param targetHardwareAddress
+ * @param targetHWAddress
* the targetHardwareAddress to set
*/
public ARP setTargetHardwareAddress(final byte[] targetHWAddress) {
@@ -218,7 +218,7 @@
}
/**
- * @param targetProtocolAddress
+ * @param targetProtoAddress
* the targetProtocolAddress to set
*/
public ARP setTargetProtocolAddress(final byte[] targetProtoAddress) {
diff --git a/utils/misc/src/main/java/org/onlab/packet/DHCP.java b/utils/misc/src/main/java/org/onlab/packet/DHCP.java
index b355496..2a116b1 100644
--- a/utils/misc/src/main/java/org/onlab/packet/DHCP.java
+++ b/utils/misc/src/main/java/org/onlab/packet/DHCP.java
@@ -294,7 +294,7 @@
/**
* Gets a specific DHCP option parameter.
*
- * @param opetionCode
+ * @param optionCode
* The option code to get
* @return The value of the option if it exists, null otherwise
*/
diff --git a/utils/misc/src/main/java/org/onlab/packet/Ethernet.java b/utils/misc/src/main/java/org/onlab/packet/Ethernet.java
index 8399e57..ee6d0c2 100644
--- a/utils/misc/src/main/java/org/onlab/packet/Ethernet.java
+++ b/utils/misc/src/main/java/org/onlab/packet/Ethernet.java
@@ -96,7 +96,7 @@
/**
* Sets the destination MAC address.
*
- * @param destinationMACAddress the destination MAC to set
+ * @param destMac the destination MAC to set
* @return the Ethernet frame
*/
public Ethernet setDestinationMACAddress(final byte[] destMac) {
@@ -107,7 +107,7 @@
/**
* Sets the destination MAC address.
*
- * @param destinationMACAddress the destination MAC to set
+ * @param destMac the destination MAC to set
* @return the Ethernet frame
*/
public Ethernet setDestinationMACAddress(final String destMac) {
@@ -136,7 +136,7 @@
/**
* Sets the source MAC address.
*
- * @param sourceMACAddress the source MAC to set
+ * @param sourceMac the source MAC to set
* @return the Ethernet frame
*/
public Ethernet setSourceMACAddress(final byte[] sourceMac) {
@@ -147,7 +147,7 @@
/**
* Sets the source MAC address.
*
- * @param sourceMACAddress the source MAC to set
+ * @param sourceMac the source MAC to set
* @return the Ethernet frame
*/
public Ethernet setSourceMACAddress(final String sourceMac) {
@@ -167,7 +167,7 @@
/**
* Sets the priority code.
*
- * @param priorityCode the priorityCode to set
+ * @param priority the priorityCode to set
* @return the Ethernet frame
*/
public Ethernet setPriorityCode(final byte priority) {
@@ -187,7 +187,7 @@
/**
* Sets the VLAN ID.
*
- * @param vlanID the vlanID to set
+ * @param vlan the vlanID to set
* @return the Ethernet frame
*/
public Ethernet setVlanID(final short vlan) {
@@ -207,7 +207,7 @@
/**
* Sets the Ethernet type.
*
- * @param etherType the etherType to set
+ * @param ethType the etherType to set
* @return the Ethernet frame
*/
public Ethernet setEtherType(final short ethType) {
@@ -242,7 +242,7 @@
/**
* Pad this packet to 60 bytes minimum, filling with zeros?
*
- * @param pad
+ * @param pd
* the pad to set
*/
public Ethernet setPad(final boolean pd) {
@@ -535,7 +535,7 @@
} else if (pkt instanceof LLC) {
sb.append("\nllc packet");
} else {
- sb.append("\nunknwon packet");
+ sb.append("\nunknown packet");
}
return sb.toString();
diff --git a/utils/misc/src/main/java/org/onlab/packet/IPacket.java b/utils/misc/src/main/java/org/onlab/packet/IPacket.java
index 36ab1ad..829492f 100644
--- a/utils/misc/src/main/java/org/onlab/packet/IPacket.java
+++ b/utils/misc/src/main/java/org/onlab/packet/IPacket.java
@@ -38,27 +38,27 @@
public interface IPacket {
/**
*
- * @return
+ * @return the payload
*/
public IPacket getPayload();
/**
*
- * @param packet
- * @return
+ * @param packet new payload
+ * @return self
*/
public IPacket setPayload(IPacket packet);
/**
*
- * @return
+ * @return parent packet
*/
public IPacket getParent();
/**
*
- * @param packet
- * @return
+ * @param packet new parent
+ * @return self
*/
public IPacket setParent(IPacket packet);
@@ -90,7 +90,7 @@
/**
* Clone this packet and its payload packet but not its parent.
*
- * @return
+ * @return the clone
*/
public Object clone();
}
diff --git a/utils/misc/src/main/java/org/onlab/packet/IPv4.java b/utils/misc/src/main/java/org/onlab/packet/IPv4.java
index 395bcc5..4b9fd66 100644
--- a/utils/misc/src/main/java/org/onlab/packet/IPv4.java
+++ b/utils/misc/src/main/java/org/onlab/packet/IPv4.java
@@ -422,8 +422,8 @@
* Accepts an IPv4 address of the form xxx.xxx.xxx.xxx, ie 192.168.0.1 and
* returns the corresponding 32 bit integer.
*
- * @param ipAddress
- * @return
+ * @param ipAddress ip address in string form
+ * @return int ip address value
*/
public static int toIPv4Address(final String ipAddress) {
if (ipAddress == null) {
@@ -447,8 +447,8 @@
* Accepts an IPv4 address in a byte array and returns the corresponding
* 32-bit integer value.
*
- * @param ipAddress
- * @return
+ * @param ipAddress ip address in byte form
+ * @return int ip address value
*/
public static int toIPv4Address(final byte[] ipAddress) {
int ip = 0;
@@ -463,8 +463,8 @@
* Accepts an IPv4 address and returns of string of the form xxx.xxx.xxx.xxx,
* e.g., 192.168.0.1.
*
- * @param ipAddress
- * @return
+ * @param ipAddress ip address in form
+ * @return string form of ip address
*/
public static String fromIPv4Address(final int ipAddress) {
final StringBuffer sb = new StringBuffer();
@@ -486,7 +486,7 @@
*
* @param ipAddresses
* collection
- * @return
+ * @return ip addresses in comma-separated string form
*/
public static String fromIPv4AddressCollection(
final Collection<Integer> ipAddresses) {
diff --git a/utils/misc/src/main/java/org/onlab/packet/LLDP.java b/utils/misc/src/main/java/org/onlab/packet/LLDP.java
index a8dc15e..105a9f3 100644
--- a/utils/misc/src/main/java/org/onlab/packet/LLDP.java
+++ b/utils/misc/src/main/java/org/onlab/packet/LLDP.java
@@ -62,7 +62,7 @@
}
/**
- * @param chassisId
+ * @param chassis
* the chassisId to set
*/
public LLDP setChassisId(final LLDPTLV chassis) {
diff --git a/utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java b/utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java
index ea24422..37213d0 100644
--- a/utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java
+++ b/utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java
@@ -228,7 +228,7 @@
/**
* Sets switch DPID in LLDP packet.
*
- * @param sw the switch instance
+ * @param dp the switch instance
*/
public void setSwitch(long dp) {
final byte[] dpid = ByteBuffer.allocate(8).putLong(dp)
@@ -243,8 +243,7 @@
* @param port the port instance
*/
public void setPort(int port) {
- int portNumber = port;
- this.setPortTLV(portNumber);
+ this.setPortTLV(port);
}
/**
@@ -260,7 +259,7 @@
* Checks if LLDP packet has correct size, LLDP multicast address, and
* ethertype. Packet assumed to have Ethernet header.
*
- * @param packet
+ * @param packet packet data
* @return true if packet is LLDP, false otherwise
*/
public static boolean isLLDP(final byte[] packet) {
@@ -304,8 +303,8 @@
* organizationally specific TLVs that use ON.Lab's OUI. Assumes packet is
* valid LLDP packet
*
- * @param packet
- * @return
+ * @param packet packet data
+ * @return eth type or -1
*/
public static short isOVXLLDP(byte[] packet) {
if (packet.length < OVX_LLDP_SIZE) {
@@ -340,7 +339,7 @@
/**
* Extracts dpid and port from OVX-generated LLDP packet.
*
- * @param packet
+ * @param packet packet data
* @return Dpid and port
*/
public static DPIDandPort parseLLDP(final byte[] packet) {