From: Robert Varga Date: Thu, 24 Nov 2016 22:56:18 +0000 (+0100) Subject: Fix javadocs and enable doclint X-Git-Tag: release/oxygen~40^2~18 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=d731f8844bb905e774977bb557f63b20c62a0907;p=openflowplugin.git Fix javadocs and enable doclint This eliminates the doclint suppression and fixes up javadoc, so they work with Java 8 out of the box. Change-Id: I7294f0dcd570e3e3c445e54cc8989078175d05d7 Signed-off-by: Robert Varga --- diff --git a/pom.xml b/pom.xml index edfc55397a..62a21f23e4 100644 --- a/pom.xml +++ b/pom.xml @@ -54,28 +54,6 @@ - - - - jdk8 - - [1.8,) - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - -Xdoclint:none - - - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git scm:git:ssh://git.opendaylight.org:29418/controller.git diff --git a/src/main/java/org/opendaylight/controller/liblldp/BitBufferHelper.java b/src/main/java/org/opendaylight/controller/liblldp/BitBufferHelper.java index c1d2beff3e..fd0659990e 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/BitBufferHelper.java +++ b/src/main/java/org/opendaylight/controller/liblldp/BitBufferHelper.java @@ -37,7 +37,6 @@ public abstract class BitBufferHelper { /** * Returns the first byte from the byte array - * @param byte[] data * @return byte value */ public static byte getByte(byte[] data) { @@ -55,7 +54,6 @@ public abstract class BitBufferHelper { /** * Returns the short value for the byte array passed. * Size of byte array is restricted to Short.SIZE - * @param byte[] data * @return short value */ public static short getShort(byte[] data) { @@ -73,7 +71,6 @@ public abstract class BitBufferHelper { /** * Returns the int value for the byte array passed. * Size of byte array is restricted to Integer.SIZE - * @param byte[] data * @return int - the integer value of byte array */ public static int getInt(byte[] data) { @@ -91,7 +88,6 @@ public abstract class BitBufferHelper { /** * Returns the long value for the byte array passed. * Size of byte array is restricted to Long.SIZE - * @param byte[] data * @return long - the integer value of byte array */ public static long getLong(byte[] data) { @@ -109,8 +105,6 @@ public abstract class BitBufferHelper { /** * Returns the short value for the last numBits of the byte array passed. * Size of numBits is restricted to Short.SIZE - * @param byte[] data - * @param int - numBits * @return short - the short value of byte array */ public static short getShort(byte[] data, int numBits) { @@ -135,8 +129,6 @@ public abstract class BitBufferHelper { /** * Returns the int value for the last numBits of the byte array passed. * Size of numBits is restricted to Integer.SIZE - * @param byte[] data - * @param int - numBits * @return int - the integer value of byte array */ public static int getInt(byte[] data, int numBits) { @@ -161,8 +153,6 @@ public abstract class BitBufferHelper { /** * Returns the long value for the last numBits of the byte array passed. * Size of numBits is restricted to Long.SIZE - * @param byte[] data - * @param int - numBits * @return long - the integer value of byte array */ public static long getLong(byte[] data, int numBits) { @@ -205,9 +195,8 @@ public abstract class BitBufferHelper { * 0101000010 | 0000101 | 1111001010010101011 * will be returned as {0,0,0,0,0,1,0,1} * - * @param byte[] data - * @param int startOffset - offset to start fetching bits from data from - * @param int numBits - number of bits to be fetched from data + * @param startOffset - offset to start fetching bits from data from + * @param numBits - number of bits to be fetched from data * @return byte [] - LSB aligned bits * * @throws BufferException @@ -286,10 +275,10 @@ public abstract class BitBufferHelper { /** * Bits are expected to be stored in the input byte array from LSB - * @param byte[] - data to set the input byte - * @param byte - input byte to be inserted - * @param startOffset - offset of data[] to start inserting byte from - * @param numBits - number of bits of input to be inserted into data[] + * @param data to set the input byte + * @param input byte to be inserted + * @param startOffset offset of data[] to start inserting byte from + * @param numBits number of bits of input to be inserted into data[] * * @throws BufferException * when the input, startOffset and numBits are not congruent @@ -304,11 +293,10 @@ public abstract class BitBufferHelper { /** * Bits are expected to be stored in the input byte array from LSB - * @param byte[] - data to set the input byte - * @param byte[] - input bytes to be inserted - * @param startOffset - offset of data[] to start inserting byte from - * @param numBits - number of bits of input to be inserted into data[] - * @return void + * @param data to set the input byte + * @param input bytes to be inserted + * @param startOffset offset of data[] to start inserting byte from + * @param numBits number of bits of input to be inserted into data[] * @throws BufferException * when the startOffset and numBits parameters are not congruent * with data and input buffers' size @@ -321,9 +309,6 @@ public abstract class BitBufferHelper { /** * Returns numBits 1's in the MSB position - * - * @param numBits - * @return */ public static int getMSBMask(int numBits) { int mask = 0; @@ -335,9 +320,6 @@ public abstract class BitBufferHelper { /** * Returns numBits 1's in the LSB position - * - * @param numBits - * @return */ public static int getLSBMask(int numBits) { int mask = 0; @@ -350,7 +332,6 @@ public abstract class BitBufferHelper { /** * Returns the numerical value of the byte array passed * - * @param byte[] - array * @return long - numerical value of byte array passed */ static public long toNumber(byte[] array) { @@ -372,8 +353,6 @@ public abstract class BitBufferHelper { * Returns the numerical value of the last numBits (LSB bits) of the byte * array passed * - * @param byte[] - array - * @param int - numBits * @return long - numerical value of byte array passed */ static public long toNumber(byte[] array, int numBits) { @@ -405,12 +384,7 @@ public abstract class BitBufferHelper { * Accepts a number as input and returns its value in byte form in LSB * aligned form example: input = 5000 [1001110001000] bytes = 19, -120 * [00010011] [10001000] - * - * @param Number - * @return byte[] - * */ - public static byte[] toByteArray(Number input) { Class dataType = input.getClass(); short size = 0; @@ -445,9 +419,7 @@ public abstract class BitBufferHelper { * aligned form example: input = 5000 [1001110001000] bytes = -114, 64 * [10011100] [01000000] * - * @param Number - * input - * @param int numBits - the number of bits to be returned + * @param numBits - the number of bits to be returned * @return byte[] * */ @@ -500,21 +472,15 @@ public abstract class BitBufferHelper { /** * Takes an LSB aligned byte array and returned the LSB numBits in a MSB - * aligned byte array - * - * @param inputbytes - * @param numBits - * @return - */ - /** + * aligned byte array. + *

* It aligns the last numBits bits to the head of the byte array following * them with numBits % 8 zero bits. * * Example: For inputbytes = [00000111][01110001] and numBits = 12 it * returns: shiftedBytes = [01110111][00010000] * - * @param byte[] inputBytes - * @param int numBits - number of bits to be left aligned + * @param numBits - number of bits to be left aligned * @return byte[] */ public static byte[] shiftBitsToMSB(byte[] inputBytes, int numBits) { @@ -571,8 +537,8 @@ public abstract class BitBufferHelper { * Example: For inputbytes = [01110111][00010000] and numBits = 12 it * returns: shiftedBytes = [00000111][01110001] * - * @param byte[] inputBytes - * @param int numBits - number of bits to be right aligned + * @param inputBytes + * @param numBits - number of bits to be right aligned * @return byte[] */ public static byte[] shiftBitsToLSB(byte[] inputBytes, int numBits) { @@ -604,11 +570,6 @@ public abstract class BitBufferHelper { * Insert in the data buffer at position dictated by the offset the number * of bits specified from the input data byte array. The input byte array * has the bits stored starting from the LSB - * - * @param byte[] data - * @param byte[] inputdata - * @param int startOffset - * @param int numBits */ public static void insertBits(byte[] data, byte[] inputdataLSB, int startOffset, int numBits) { @@ -690,10 +651,7 @@ public abstract class BitBufferHelper { /** * Checks for overflow and underflow exceptions - * @param data - * @param startOffset - * @param numBits - * @throws PacketException when the startOffset and numBits parameters + * @throws BufferException when the startOffset and numBits parameters * are not congruent with the data buffer's size */ public static void checkExceptions(byte[] data, int startOffset, int numBits) diff --git a/src/main/java/org/opendaylight/controller/liblldp/DataLinkAddress.java b/src/main/java/org/opendaylight/controller/liblldp/DataLinkAddress.java index de9f4ec820..2649489569 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/DataLinkAddress.java +++ b/src/main/java/org/opendaylight/controller/liblldp/DataLinkAddress.java @@ -37,8 +37,6 @@ abstract public class DataLinkAddress implements Serializable { * * @param name Create a new DataLink, not for general use but * available only for sub classes - * - * @return constructed object */ protected DataLinkAddress(String name) { this.name = name; diff --git a/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java b/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java index c2d9e7003e..424bdd016a 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java +++ b/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java @@ -104,7 +104,7 @@ public class Ethernet extends Packet { /** * Sets the destination MAC address for the current Ethernet object instance - * @param byte[] - the destinationMACAddress to set + * @param destinationMACAddress the destinationMACAddress to set */ public Ethernet setDestinationMACAddress(byte[] destinationMACAddress) { fieldValues.put(DMAC, destinationMACAddress); @@ -113,7 +113,7 @@ public class Ethernet extends Packet { /** * Sets the source MAC address for the current Ethernet object instance - * @param byte[] - the sourceMACAddress to set + * @param sourceMACAddress the sourceMACAddress to set */ public Ethernet setSourceMACAddress(byte[] sourceMACAddress) { fieldValues.put(SMAC, sourceMACAddress); @@ -122,7 +122,7 @@ public class Ethernet extends Packet { /** * Sets the etherType for the current Ethernet object instance - * @param short - the etherType to set + * @param etherType the etherType to set */ public Ethernet setEtherType(short etherType) { byte[] ethType = BitBufferHelper.toByteArray(etherType); diff --git a/src/main/java/org/opendaylight/controller/liblldp/EthernetAddress.java b/src/main/java/org/opendaylight/controller/liblldp/EthernetAddress.java index a3f8d5075d..947603c45b 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/EthernetAddress.java +++ b/src/main/java/org/opendaylight/controller/liblldp/EthernetAddress.java @@ -52,8 +52,6 @@ public class EthernetAddress extends DataLinkAddress { * * @param macAddress A byte array in big endian format * representing the Ethernet MAC Address - * - * @return The constructed object if valid */ public EthernetAddress(byte[] macAddress) throws ConstructionException { super(addressName); diff --git a/src/main/java/org/opendaylight/controller/liblldp/LLDP.java b/src/main/java/org/opendaylight/controller/liblldp/LLDP.java index 15dced5f11..bbee8599b6 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/LLDP.java +++ b/src/main/java/org/opendaylight/controller/liblldp/LLDP.java @@ -90,7 +90,7 @@ public class LLDP extends Packet { } /** - * @param String + * @param type * - description of the type of TLV * @return LLDPTLV - full TLV */ @@ -103,11 +103,10 @@ public class LLDP extends Packet { } /** - * @param String + * @param type * - description of the type of TLV - * @param LLDPTLV + * @param tlv * - tlv to set - * @return void */ public void setTLV(String type, LLDPTLV tlv) { putToTLVs(getType(type), tlv); @@ -121,7 +120,7 @@ public class LLDP extends Packet { } /** - * @param LLDPTLV + * @param chassisId * - the chassisId to set */ public LLDP setChassisId(LLDPTLV chassisId) { @@ -137,8 +136,8 @@ public class LLDP extends Packet { } /** - * @param LLDPTLV - * - the chassisId to set + * @param systemNameId + * - the systemNameId to set */ public LLDP setSystemNameId(LLDPTLV systemNameId) { setTLV(SYSTEMNAMEID, systemNameId); @@ -153,7 +152,7 @@ public class LLDP extends Packet { } /** - * @param LLDPTLV + * @param portId * - the portId to set * @return LLDP */ @@ -170,7 +169,7 @@ public class LLDP extends Packet { } /** - * @param LLDPTLV + * @param ttl * - the ttl to set * @return LLDP */ @@ -206,7 +205,7 @@ public class LLDP extends Packet { } /** - * @param customTLVList + * @param customTLV * the list of custom TLVs to set * @return this LLDP */ diff --git a/src/main/java/org/opendaylight/controller/liblldp/LLDPTLV.java b/src/main/java/org/opendaylight/controller/liblldp/LLDPTLV.java index 3c5623475e..bc241928fb 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/LLDPTLV.java +++ b/src/main/java/org/opendaylight/controller/liblldp/LLDPTLV.java @@ -121,7 +121,7 @@ public class LLDPTLV extends Packet { } /** - * @param byte - the type to set + * @param type the type to set * @return LLDPTLV */ public LLDPTLV setType(byte type) { @@ -131,7 +131,7 @@ public class LLDPTLV extends Packet { } /** - * @param short - the length to set + * @param length the length to set * @return LLDPTLV */ public LLDPTLV setLength(short length) { @@ -140,7 +140,7 @@ public class LLDPTLV extends Packet { } /** - * @param byte[] - the value to set + * @param value the value to set * @return LLDPTLV */ public LLDPTLV setValue(byte[] value) { @@ -266,10 +266,10 @@ public class LLDPTLV extends Packet { /** * Creates the custom TLV value including OUI, subtype and custom string * - * @param portId + * @param customString * port identifier string * @return the custom TLV value in byte array - * @see {@link #createCustomTLVValue(byte,String)} + * @see #createCustomTLVValue(byte[],byte[]) */ static public byte[] createCustomTLVValue(String customString) { byte[] customByteArray = customString.getBytes(Charset.defaultCharset()); @@ -279,7 +279,7 @@ public class LLDPTLV extends Packet { /** * Creates the custom TLV value including OUI, subtype and custom string * @param subtype openflow subtype - * @param portId + * @param customByteArray * port identifier string * @return the custom TLV value in byte array */ diff --git a/src/main/java/org/opendaylight/controller/liblldp/Packet.java b/src/main/java/org/opendaylight/controller/liblldp/Packet.java index 59a786339d..8a4fa36970 100644 --- a/src/main/java/org/opendaylight/controller/liblldp/Packet.java +++ b/src/main/java/org/opendaylight/controller/liblldp/Packet.java @@ -76,10 +76,10 @@ public abstract class Packet { * This method deserializes the data bits obtained from the wire into the * respective header and payload which are of type Packet * - * @param byte[] data - data from wire to deserialize - * @param int bitOffset bit position where packet header starts in data + * @param data - data from wire to deserialize + * @param bitOffset bit position where packet header starts in data * array - * @param int size of packet in bits + * @param size size of packet in bits * @return Packet * @throws PacketException */ @@ -205,7 +205,7 @@ public abstract class Packet { * normal Packet.serialize() path. An example is the checksum computation * for IPv4 * - * @param byte[] - serialized bytes + * @param myBytes serialized bytes * @throws PacketException */ protected void postSerializeCustomOperation(byte[] myBytes) @@ -220,8 +220,8 @@ public abstract class Packet { * Currently only IPv4 and ICMP do checksum computation and validation. TCP * and UDP need to implement these if required. * - * @param byte[] data The byte stream representing the Ethernet frame - * @param int startBitOffset The bit offset from where the byte array corresponding to this Packet starts in the frame + * @param data The byte stream representing the Ethernet frame + * @param startBitOffset The bit offset from where the byte array corresponding to this Packet starts in the frame * @throws PacketException */ protected void postDeserializeCustomOperation(byte[] data, int startBitOffset) @@ -255,8 +255,6 @@ public abstract class Packet { * 'fieldname'. The offset is present in the hdrFieldCoordMap of the * respective packet class * - * @param String - * fieldName * @return Integer - startOffset of the requested field */ public int getfieldOffset(String fieldName) { @@ -268,8 +266,6 @@ public abstract class Packet { * 'fieldname'. The numBits are present in the hdrFieldCoordMap of the * respective packet class * - * @param String - * fieldName * @return Integer - number of bits of the requested field */ public int getfieldnumBits(String fieldName) {