You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2018/07/31 03:05:21 UTC
[directory-ldap-api] branch master updated: Fixed javadoc LINT
warnings and errors
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git
The following commit(s) were added to refs/heads/master by this push:
new af087f2 Fixed javadoc LINT warnings and errors
af087f2 is described below
commit af087f2099776217a3ebee4519a14ee24a735d76
Author: Emmanuel Lécharny <el...@symas.com>
AuthorDate: Tue Jul 31 05:05:20 2018 +0200
Fixed javadoc LINT warnings and errors
---
.../org/apache/directory/api/asn1/util/Oid.java | 196 +++++++++++++++------
.../directory/api/asn1/ber/tlv/IntegerDecoder.java | 4 +
2 files changed, 145 insertions(+), 55 deletions(-)
diff --git a/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java b/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java
index d7e5426..1d1e702 100644
--- a/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java
+++ b/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java
@@ -81,56 +81,56 @@ public final class Oid
/** The OID as a String */
private String oidString;
- private static final BigInteger JOINT_ISO_ITU_T = new BigInteger( "80" );
+ private static final BigInteger JOINT_ISO_ITU_T = BigInteger.valueOf( 80 );
/**
* The OID FSA states. We have the following Finite State Automaton :
*
* <pre>
- * (Start) --['0','1']--> (A)
- * (start) --['2']--> (F)
+ * (Start) --['0','1']--> (A)
+ * (start) --['2']--> (F)
*
- * (A) --['.']--> (B)
+ * (A) --['.']--> (B)
*
- * (B) --['0']--> (D)
- * (B) --['1'..'3']--> (C)
- * (B) --['4'..'9']--> (E)
+ * (B) --['0']--> (D)
+ * (B) --['1'..'3']--> (C)
+ * (B) --['4'..'9']--> (E)
*
- * (C) --[]--> (End)
- * (C) --['.']--> (K)
- * (C) --['0'..'9']--> (E)
+ * (C) --[]--> (End)
+ * (C) --['.']--> (K)
+ * (C) --['0'..'9']--> (E)
*
- * (D) --[]--> (End)
- * (D) --['.']--> (K)
+ * (D) --[]--> (End)
+ * (D) --['.']--> (K)
*
- * (E) --[]--> (End)
- * (E) --['.']--> (K)
+ * (E) --[]--> (End)
+ * (E) --['.']--> (K)
*
- * (F) --['.']--> (G)
+ * (F) --['.']--> (G)
*
- * (G) --['0']--> (I)
- * (G) --['1'..'9']--> (H)
+ * (G) --['0']--> (I)
+ * (G) --['1'..'9']--> (H)
*
- * (H) --[]--> (End)
- * (H) --['.']--> (K)
- * (H) --['0'..'9']--> (J)
+ * (H) --[]--> (End)
+ * (H) --['.']--> (K)
+ * (H) --['0'..'9']--> (J)
*
- * (I) --[]--> (End)
- * (I) --['.']--> (K)
+ * (I) --[]--> (End)
+ * (I) --['.']--> (K)
*
- * (J) --[]--> (End)
- * (J) --['.']--> (K)
- * (J) --['0'..'9']--> (J)
+ * (J) --[]--> (End)
+ * (J) --['.']--> (K)
+ * (J) --['0'..'9']--> (J)
*
- * (K) --['0']--> (M)
- * (K) --['1'..'9']--> (L)
+ * (K) --['0']--> (M)
+ * (K) --['1'..'9']--> (L)
*
- * (L) --[]--> (End)
- * (L) --['.']--> (K)
- * (L) --['0'..'9']--> (L)
+ * (L) --[]--> (End)
+ * (L) --['.']--> (K)
+ * (L) --['0'..'9']--> (L)
*
- * (M) --[]--> (End)
- * (M) --['.']--> (K)
+ * (M) --[]--> (End)
+ * (M) --['.']--> (K)
* </pre>
*/
private enum OidFSAState
@@ -368,9 +368,15 @@ public final class Oid
/**
* Process state A
* <pre>
- * (Start) --['0','1']--> (A)
- * (start) --['2']--> (F)
+ * (Start) --['0','1']--> (A)
+ * (start) --['2']--> (F)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateStart( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -396,8 +402,13 @@ public final class Oid
/**
* Process state B
* <pre>
- * (A) --['.']--> (B)
+ * (A) --['.']--> (B)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateA( String oid, int pos ) throws DecoderException
{
@@ -414,10 +425,16 @@ public final class Oid
/**
* Process state B
* <pre>
- * (B) --['0']--> (D)
- * (B) --['1'..'3']--> (C)
- * (B) --['4'..'9']--> (E)
+ * (B) --['0']--> (D)
+ * (B) --['1'..'3']--> (C)
+ * (B) --['4'..'9']--> (E)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateB( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -455,9 +472,15 @@ public final class Oid
/**
* Process state C
* <pre>
- * (C) --['.']--> (K)
- * (C) --['0'..'9']--> (E)
+ * (C) --['.']--> (K)
+ * (C) --['0'..'9']--> (E)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateC( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -494,9 +517,15 @@ public final class Oid
/**
* Process state D and E
* <pre>
- * (D) --['.']--> (K)
- * (E) --['.']--> (K)
+ * (D) --['.']--> (K)
+ * (E) --['.']--> (K)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateDE( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -519,8 +548,13 @@ public final class Oid
/**
* Process state F
* <pre>
- * (F) --['.']--> (G)
+ * (F) --['.']--> (G)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateF( String oid, int pos ) throws DecoderException
{
@@ -537,9 +571,15 @@ public final class Oid
/**
* Process state G
* <pre>
- * (G) --['0']--> (I)
- * (G) --['1'..'9']--> (H)
+ * (G) --['0']--> (I)
+ * (G) --['1'..'9']--> (H)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateG( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -574,9 +614,15 @@ public final class Oid
/**
* Process state H
* <pre>
- * (H) --['.']--> (K)
- * (H) --['0'..'9']--> (J)
+ * (H) --['.']--> (K)
+ * (H) --['0'..'9']--> (J)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateH( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -614,8 +660,14 @@ public final class Oid
/**
* Process state I
* <pre>
- * (I) --['.']--> (K)
+ * (I) --['.']--> (K)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateI( String oid, byte[] buffer, int pos ) throws DecoderException
{
@@ -638,9 +690,16 @@ public final class Oid
/**
* Process state J
* <pre>
- * (J) --['.']--> (K)
- * (J) --['0'..'9']--> (J)
+ * (J) --['.']--> (K)
+ * (J) --['0'..'9']--> (J)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param bufferPos The current position in the buffer
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateJ( String oid, byte[] buffer, int bufferPos, int pos ) throws DecoderException
{
@@ -675,9 +734,16 @@ public final class Oid
/**
* Process state J
* <pre>
- * (K) --['0']--> (M)
- * (K) --['1'..'9']--> (L)
+ * (K) --['0']--> (M)
+ * (K) --['1'..'9']--> (L)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param bufferPos The current position in the buffer
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateK( String oid, byte[] buffer, int bufferPos, int pos ) throws DecoderException
{
@@ -711,9 +777,16 @@ public final class Oid
/**
* Process state J
* <pre>
- * (L) --['.']--> (K)
- * (L) --['0'..'9']--> (L)
+ * (L) --['.']--> (K)
+ * (L) --['0'..'9']--> (L)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param buffer The buffer gathering the binary OID
+ * @param bufferPos The current position in the buffer
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateL( String oid, byte[] buffer, int bufferPos, int pos ) throws DecoderException
{
@@ -749,8 +822,13 @@ public final class Oid
/**
* Process state J
* <pre>
- * (M) --['.']--> (K)
+ * (M) --['.']--> (K)
* </pre>
+ *
+ * @param oid The OID to check
+ * @param pos The position in the OID string
+ * @return The next OID decoding state
+ * @throws DecoderException If the OID is invalid
*/
private static OidFSAState processStateM( String oid, int pos ) throws DecoderException
{
@@ -771,6 +849,14 @@ public final class Oid
/**
* Convert a list of digits to a list of 7 bits bytes. We must start by the end, and we don't
* know how many bytes we will need, except when we will be done with the conversion.
+ *
+ * @param oid The OID to convert
+ * @param buffer The buffer gathering the binary OID
+ * @param start The starting position in the OID string
+ * @param nbDigits Teh number of digits the OID has
+ * @param posBuffer The position in the buffer
+ * @param isJointIsoItuT A flag set if we know the OID is a JointIsoItuT OID
+ * @return The number of bytes required to store the OID in a PDU
*/
private static int convert( String oid, byte[] buffer, int start, int nbDigits, int posBuffer, boolean isJointIsoItuT )
{
diff --git a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java
index 56d378a..2883f5d 100644
--- a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java
+++ b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java
@@ -101,6 +101,10 @@ public final class IntegerDecoder
* <li>0x02 0x02 0x00 0xFF : integer 255</li>
* </ul>
* and so on...
+ *
+ * @param value the BER PDU to parse
+ * @return The decoded value
+ * @exception IntegerDecoderException If the BER contains an invalid integer value
*/
private static int parseInt( BerValue value ) throws IntegerDecoderException
{