Fix javadocs and enable doclint
authorRobert Varga <rovarga@cisco.com>
Thu, 24 Nov 2016 22:56:18 +0000 (23:56 +0100)
committerRobert Varga <rovarga@cisco.com>
Fri, 25 Nov 2016 09:18:09 +0000 (10:18 +0100)
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 <rovarga@cisco.com>
pom.xml
src/main/java/org/opendaylight/controller/liblldp/BitBufferHelper.java
src/main/java/org/opendaylight/controller/liblldp/DataLinkAddress.java
src/main/java/org/opendaylight/controller/liblldp/Ethernet.java
src/main/java/org/opendaylight/controller/liblldp/EthernetAddress.java
src/main/java/org/opendaylight/controller/liblldp/LLDP.java
src/main/java/org/opendaylight/controller/liblldp/LLDPTLV.java
src/main/java/org/opendaylight/controller/liblldp/Packet.java

diff --git a/pom.xml b/pom.xml
index edfc55397ae8e20ef888829f39dd2a7f8a6a7db2..62a21f23e428f760604fa32a9b28c1da2238e401 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     </plugins>
   </build>
 
-  <profiles>
-    <!-- Turn off doclint on aggregated API javadoc build. -->
-    <profile>
-      <id>jdk8</id>
-      <activation>
-        <jdk>[1.8,)</jdk>
-      </activation>
-
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-javadoc-plugin</artifactId>
-            <configuration>
-              <additionalparam>-Xdoclint:none</additionalparam>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <scm>
     <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
index c1d2beff3e4ba84a6d0f2d4ddf730511e2483235..fd0659990e58b4d0a246655f00c12d8c6a3adc40 100644 (file)
@@ -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<? extends Number> 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.
+     * <p>
      * 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)
index de9f4ec82007565bdf78ed3fb78f6a4274074373..2649489569a90c89d50ae70846b180903968f66e 100644 (file)
@@ -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;
index c2d9e7003e2908f23874e1495149bd14ffead437..424bdd016aaae2ec06799e692b661bcd0c2a16f1 100644 (file)
@@ -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);
index a3f8d5075d6728c569e631a7c0f8f51766145bb4..947603c45b032432c4d7608231084723d7f2bd98 100644 (file)
@@ -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);
index 15dced5f1114ad7df4faf815d7d785c4bbc69ad9..bbee8599b62fe96d2643ae894b69dabbafc35f81 100644 (file)
@@ -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
      */
index 3c5623475e20cf21b5afaf1db7df609c4642df40..bc241928fb6994222362a1d5a360fc4362b2a212 100644 (file)
@@ -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
      */
index 59a786339d4e18d524deb4eb3a94e3f43aac843e..8a4fa36970a4faaa6fd6b4175fd66e6d6f28bacb 100644 (file)
@@ -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) {