Cleaned up warnings reported by the Javadoc tool.
Javadoc reports warnings for things such as missing return descriptions,
missing or wrong parameters, invalid tags.
Note: I didn't touch any of the warnings in the OpenflowJ code.
Change-Id: I7234f617e092b489fad599196fc9cbe78f7e2db1
diff --git a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java
index 4d26cf3..e7182a7 100644
--- a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java
+++ b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java
@@ -50,7 +50,7 @@
* increment version, avoiding versionNonexistant.
*
* @param version
- * @return
+ * @return the next version number
*/
protected static long getNextVersion(final long version) {
long nextVersion = version + 1;
diff --git a/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java b/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java
index 306ebc5..52f92ad 100644
--- a/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java
+++ b/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java
@@ -106,10 +106,11 @@
/**
* Gets an instance from DeviceID in default namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key DeviceID
* @return KVDevice instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVDevice createFromKey(final byte[] key) {
return createFromKey(key, DEFAULT_NAMESPACE);
@@ -117,11 +118,12 @@
/**
* Gets an instance from DeviceID in specified namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key DeviceID
* @param namespace namespace to create this object in
* @return KVDevice instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVDevice createFromKey(final byte[] key, final String namespace) {
return new KVDevice(getMacFromKey(key), namespace);
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 4ad9b74..0945071 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
@@ -183,10 +183,11 @@
/**
* Gets an instance from LinkID in default namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key LinkID
* @return KVLink instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVLink createFromKey(final byte[] key) {
return createFromKey(key, DEFAULT_NAMESPACE);
@@ -194,11 +195,12 @@
/**
* Gets an instance from LinkID in specified namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key LinkID
* @param namespace namespace to create this object in
* @return KVLink instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVLink createFromKey(final byte[] key, final String namespace) {
long[] linkTuple = getLinkTupleFromKey(key);
diff --git a/src/main/java/net/onrc/onos/core/datastore/topology/KVPort.java b/src/main/java/net/onrc/onos/core/datastore/topology/KVPort.java
index d166566..72fa348 100644
--- a/src/main/java/net/onrc/onos/core/datastore/topology/KVPort.java
+++ b/src/main/java/net/onrc/onos/core/datastore/topology/KVPort.java
@@ -153,10 +153,11 @@
/**
* Gets an instance from PortID in default namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key PortID
* @return {@link KVPort} instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVPort createFromKey(final byte[] key) {
return createFromKey(key, DEFAULT_NAMESPACE);
@@ -164,11 +165,12 @@
/**
* Gets an instance from PortID in specified namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key PortID
* @param namespace namespace to create this object.
* @return {@link KVPort} instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVPort createFromKey(final byte[] key, final String namespace) {
long[] pair = getPortPairFromKey(key);
diff --git a/src/main/java/net/onrc/onos/core/datastore/topology/KVSwitch.java b/src/main/java/net/onrc/onos/core/datastore/topology/KVSwitch.java
index aed08be..c9151de 100644
--- a/src/main/java/net/onrc/onos/core/datastore/topology/KVSwitch.java
+++ b/src/main/java/net/onrc/onos/core/datastore/topology/KVSwitch.java
@@ -118,10 +118,11 @@
/**
* Gets an instance from SwitchID in default namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key SwitchID
* @return {@link KVSwitch} instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVSwitch createFromKey(final byte[] key) {
return new KVSwitch(getDpidFromKey(key));
@@ -129,11 +130,12 @@
/**
* Gets an instance from SwitchID in specified namespace.
+ * <p/>
+ * Note: You need to call `read()` to get the DB content.
*
* @param key SwitchID
* @param namespace namespace to create this object
* @return {@link KVSwitch} instance
- * @note You need to call `read()` to get the DB content.
*/
public static KVSwitch createFromKey(final byte[] key, final String namespace) {
return new KVSwitch(getDpidFromKey(key), namespace);
diff --git a/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java b/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
index 15666b2..a3bb975 100644
--- a/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
+++ b/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
@@ -151,9 +151,10 @@
/**
* Return user-defined object properties.
+ * <p/>
+ * Note: Will not trigger deserialization.
*
* @return Will return null, if never been set, or was not deserialized
- * @note Will not trigger deserialization
*/
protected Map<Object, Object> getPropertyMap() {
return this.propertyMap;
@@ -227,7 +228,7 @@
}
/**
- * Deserialize and set {@link propertyMap}.
+ * Deserialize and set {@link #propertyMap}.
*
* @param kryo serializer to use
* @param bytes Kryo serialized Map object
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 1bf9ee6..a3ee412 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -977,7 +977,7 @@
* @param sw
* @param msg
* @param priority
- * @return
+ * @return true if the message was added successfully, otherwise false
*/
protected boolean addMessageImpl(IOFSwitch sw, OFMessage msg, MsgPriority priority) {
FlowPusherThread thread = getProcessingThread(sw);
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/IFlowPusherService.java b/src/main/java/net/onrc/onos/core/flowprogrammer/IFlowPusherService.java
index 25b8044..c1b0c41 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/IFlowPusherService.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/IFlowPusherService.java
@@ -119,7 +119,6 @@
*
* @param sw Switch to which message is pushed.
* @param flowEntry FlowEntry object used for creating message.
- * @return true if message is successfully added to a queue.
*/
void pushFlowEntry(IOFSwitch sw, FlowEntry flowEntry);
@@ -132,7 +131,6 @@
*
* @param sw Switch to which message is pushed.
* @param flowEntry FlowEntry object used for creating message.
- * @return true if message is successfully added to a queue.
*/
void pushFlowEntry(IOFSwitch sw, FlowEntry flowEntry,
MsgPriority priority);
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java b/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java
index 89b511a..bec9dd0 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java
@@ -167,7 +167,7 @@
* Note: This method is for a testing purpose. Please leave it right now.
*
* @param flowEntries
- * @return
+ * @return a list of phases, where each phase is a set of FlowEntries
*/
@SuppressWarnings("unused")
private List<Set<FlowEntry>> simpleBuildPhases(List<Collection<FlowEntry>> flowEntries) {
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PlanInstallModule.java b/src/main/java/net/onrc/onos/core/intent/runtime/PlanInstallModule.java
index b6fc3a2..d892aee 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PlanInstallModule.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PlanInstallModule.java
@@ -43,7 +43,6 @@
* It is responsible for converting Intents into FlowMods and seeing that
* they are properly installed.
*/
-
public class PlanInstallModule implements IFloodlightModule, IOFMessageListener {
protected volatile IFloodlightProviderService floodlightProvider;
@@ -354,7 +353,8 @@
*
* @param dpid DPID of affected switch
* @param shortestPathIntentId Intent to check
- * @return
+ * @return true if the flow's source switch entry is removed or expired,
+ * otherwise false.
*/
private boolean isFlowSrcRemoved(long dpid, String shortestPathIntentId) {
Intent intent = parentIntentMap.get(shortestPathIntentId);
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/ILinkDiscoveryService.java b/src/main/java/net/onrc/onos/core/linkdiscovery/ILinkDiscoveryService.java
index c5543a2..fb2de2b 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/ILinkDiscoveryService.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/ILinkDiscoveryService.java
@@ -34,7 +34,7 @@
* Returns link type of a given link.
*
* @param info
- * @return
+ * @return the link type
*/
public ILinkDiscovery.LinkType getLinkType(Link lt, LinkInfo info);
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java b/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java
index 4b44446..876702e 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java
@@ -93,7 +93,7 @@
* The portID is a 16-bit field, so mask it as an integer to get full
* positive value.
*
- * @return
+ * @return a String that uniquely identifies this NodePortTuple
*/
public String toKeyString() {
return (HexString.toHexString(nodeId) + "|" + (portId & 0xffff));
diff --git a/src/main/java/net/onrc/onos/core/packet/IPacket.java b/src/main/java/net/onrc/onos/core/packet/IPacket.java
index 9cbba4d..27be84e 100644
--- a/src/main/java/net/onrc/onos/core/packet/IPacket.java
+++ b/src/main/java/net/onrc/onos/core/packet/IPacket.java
@@ -22,24 +22,32 @@
*/
public interface IPacket {
/**
- * @return
+ * Gets the payload of the packet.
+ *
+ * @return the payload of the packet
*/
public IPacket getPayload();
/**
- * @param packet
- * @return
+ * Sets the payload of the packet.
+ *
+ * @param packet the inner packet to set as the payload
+ * @return this IPacket
*/
public IPacket setPayload(IPacket packet);
/**
- * @return
+ * Gets the parent (outer) packet.
+ *
+ * @return the parent packet
*/
public IPacket getParent();
/**
- * @param packet
- * @return
+ * Sets the parent (outer) packet.
+ *
+ * @param packet the parent packet
+ * @return this IPacket
*/
public IPacket setParent(IPacket packet);
@@ -69,7 +77,7 @@
/**
* Clone this packet and its payload packet but not its parent.
*
- * @return
+ * @return a cloned copy of this packet
*/
public Object clone();
}
diff --git a/src/main/java/net/onrc/onos/core/packet/IPv4.java b/src/main/java/net/onrc/onos/core/packet/IPv4.java
index 1ce9eec..f06495a 100644
--- a/src/main/java/net/onrc/onos/core/packet/IPv4.java
+++ b/src/main/java/net/onrc/onos/core/packet/IPv4.java
@@ -396,7 +396,7 @@
* returns the corresponding 32 bit integer.
*
* @param ipAddress
- * @return
+ * @return the IPv4 address as an integer
*/
public static int toIPv4Address(String ipAddress) {
if (ipAddress == null) {
@@ -421,7 +421,7 @@
* 32-bit integer value.
*
* @param ipAddress
- * @return
+ * @return the IPv4 address as an integer
*/
public static int toIPv4Address(byte[] ipAddress) {
int ip = 0;
@@ -437,7 +437,7 @@
* ie 192.168.0.1.
*
* @param ipAddress
- * @return
+ * @return the IPv4 address as a String
*/
public static String fromIPv4Address(int ipAddress) {
StringBuffer sb = new StringBuffer();
@@ -458,7 +458,7 @@
* addresses.
*
* @param ipAddresses collection
- * @return
+ * @return the IPv4 addresses in a String
*/
public static String fromIPv4AddressCollection(Collection<Integer> ipAddresses) {
if (ipAddresses == null) {