From 8bb114e9c44329c7a5205a8969c21b8ef03e3632 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 20:45:58 +0000 Subject: [PATCH] javadoc fixes part 2 (ticket #1894) --- core/java/src/gnu/crypto/prng/IRandomStandalone.java | 12 ++++++------ core/java/src/net/i2p/data/DataHelper.java | 12 ++++++------ core/java/src/net/i2p/data/Hash.java | 2 +- core/java/src/net/i2p/data/PublicKey.java | 2 +- core/java/src/net/i2p/data/SDSCache.java | 4 ++-- core/java/src/net/i2p/data/SigningPublicKey.java | 2 +- core/java/src/net/i2p/util/ZipFileComment.java | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/java/src/gnu/crypto/prng/IRandomStandalone.java b/core/java/src/gnu/crypto/prng/IRandomStandalone.java index 59d8b289b..b8a13e432 100644 --- a/core/java/src/gnu/crypto/prng/IRandomStandalone.java +++ b/core/java/src/gnu/crypto/prng/IRandomStandalone.java @@ -104,7 +104,7 @@ public interface IRandomStandalone extends Cloneable { * * @param attributes a set of name-value pairs that describe the desired * future instance behaviour. - * @exception IllegalArgumentException if at least one of the defined name/ + * @throws IllegalArgumentException if at least one of the defined name/ * value pairs contains invalid data. */ void init(Map attributes); @@ -113,8 +113,8 @@ public interface IRandomStandalone extends Cloneable { *

Returns the next 8 bits of random data generated from this instance.

* * @return the next 8 bits of random data generated from this instance. - * @exception IllegalStateException if the instance is not yet initialised. - * @exception LimLimitReachedExceptionStandalone this instance has reached its + * @throws IllegalStateException if the instance is not yet initialised. + * @throws LimLimitReachedExceptionStandalone this instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ byte nextByte() throws IllegalStateException, LimitReachedExceptionStandalone; @@ -130,8 +130,8 @@ public interface IRandomStandalone extends Cloneable { * out.length. * @param length the maximum number of required random bytes. This method * does nothing if this parameter is less than 1. - * @exception IllegalStateException if the instance is not yet initialised. - * @exception LimitLimitReachedExceptionStandalonehis instance has reached its + * @throws IllegalStateException if the instance is not yet initialised. + * @throws LimitLimitReachedExceptionStandalonehis instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ void nextBytes(byte[] out, int offset, int length) @@ -172,7 +172,7 @@ public interface IRandomStandalone extends Cloneable { * @param in The buffer of new random bytes to add. * @param offset The offset from whence to begin reading random bytes. * @param length The number of random bytes to add. - * @exception IndexOutOfBoundsException If offset, length, + * @throws IndexOutOfBoundsException If offset, length, * or offset+length is out of bounds. */ void addRandomBytes(byte[] in, int offset, int length); diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java index fa4434dd3..4652d19bb 100644 --- a/core/java/src/net/i2p/data/DataHelper.java +++ b/core/java/src/net/i2p/data/DataHelper.java @@ -736,7 +736,7 @@ public class DataHelper { * @param src if null returns 0 * @param numBytes 1-8 * @return non-negative - * @throws AIOOBE + * @throws ArrayIndexOutOfBoundsException * @throws IllegalArgumentException if negative (only possible if numBytes = 8) */ public static long fromLong(byte src[], int offset, int numBytes) { @@ -760,7 +760,7 @@ public class DataHelper { * * @param numBytes 1-8 * @return non-negative - * @throws AIOOBE + * @throws ArrayIndexOutOfBoundsException * @throws IllegalArgumentException if negative (only possible if numBytes = 8) * @since 0.8.12 */ @@ -1006,7 +1006,7 @@ public class DataHelper { /** * Helper util to compare two objects, including null handling. - *

+ *

* * This treats (null == null) as true, and (null == (!null)) as false. */ @@ -1021,10 +1021,10 @@ public class DataHelper { /** * Run a deep comparison across the two collections. - *

+ *

* * This treats (null == null) as true, (null == (!null)) as false, and then - * comparing each element via eq(object, object).

+ * comparing each element via eq(object, object).

* * If the size of the collections are not equal, the comparison returns false. * The collection order should be consistent, as this simply iterates across both and compares @@ -1043,7 +1043,7 @@ public class DataHelper { } /** - * Run a comparison on the byte arrays, byte by byte.

+ * Run a comparison on the byte arrays, byte by byte.

* * This treats (null == null) as true, (null == (!null)) as false, * and unequal length arrays as false. diff --git a/core/java/src/net/i2p/data/Hash.java b/core/java/src/net/i2p/data/Hash.java index 3de44edfe..62e3cee51 100644 --- a/core/java/src/net/i2p/data/Hash.java +++ b/core/java/src/net/i2p/data/Hash.java @@ -47,7 +47,7 @@ public class Hash extends SimpleDataStructure { /** * Pull from cache or return new - * @throws AIOOBE if not enough bytes + * @throws ArrayIndexOutOfBoundsException if not enough bytes * @since 0.8.3 */ public static Hash create(byte[] data, int off) { diff --git a/core/java/src/net/i2p/data/PublicKey.java b/core/java/src/net/i2p/data/PublicKey.java index aeb9e0096..874e65e35 100644 --- a/core/java/src/net/i2p/data/PublicKey.java +++ b/core/java/src/net/i2p/data/PublicKey.java @@ -29,7 +29,7 @@ public class PublicKey extends SimpleDataStructure { * Pull from cache or return new. * Deprecated - used only by deprecated Destination.readBytes(data, off) * - * @throws AIOOBE if not enough bytes, FIXME should throw DataFormatException + * @throws ArrayIndexOutOfBoundsException if not enough bytes, FIXME should throw DataFormatException * @since 0.8.3 */ public static PublicKey create(byte[] data, int off) { diff --git a/core/java/src/net/i2p/data/SDSCache.java b/core/java/src/net/i2p/data/SDSCache.java index f38fe6bbf..2ab2e2649 100644 --- a/core/java/src/net/i2p/data/SDSCache.java +++ b/core/java/src/net/i2p/data/SDSCache.java @@ -155,8 +155,8 @@ public class SDSCache { * @param off offset in the array to start reading from * @return the cached value if available, otherwise * makes a new object and returns it - * @throws AIOOBE if not enough bytes - * @throws NPE + * @throws ArrayIndexOutOfBoundsException if not enough bytes + * @throws NullPointerException */ public V get(byte[] b, int off) { byte[] data = SimpleByteCache.acquire(_datalen); diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java index 0d1ecf496..1234d1b70 100644 --- a/core/java/src/net/i2p/data/SigningPublicKey.java +++ b/core/java/src/net/i2p/data/SigningPublicKey.java @@ -40,7 +40,7 @@ public class SigningPublicKey extends SimpleDataStructure { * Pull from cache or return new. * Deprecated - used only by deprecated Destination.readBytes(data, off) * - * @throws AIOOBE if not enough bytes, FIXME should throw DataFormatException + * @throws ArrayIndexOutOfBoundsException if not enough bytes, FIXME should throw DataFormatException * @since 0.8.3 */ public static SigningPublicKey create(byte[] data, int off) { diff --git a/core/java/src/net/i2p/util/ZipFileComment.java b/core/java/src/net/i2p/util/ZipFileComment.java index a20407fe8..b0d590fea 100644 --- a/core/java/src/net/i2p/util/ZipFileComment.java +++ b/core/java/src/net/i2p/util/ZipFileComment.java @@ -37,7 +37,7 @@ public abstract class ZipFileComment { * @return empty string if no comment, or the comment. * The string is decoded with UTF-8 * - * @throws IOE if no valid end-of-central-directory record found + * @throws IOException if no valid end-of-central-directory record found */ public static String getComment(File file, int max) throws IOException { return getComment(file, max, 0); @@ -53,7 +53,7 @@ public abstract class ZipFileComment { * @return empty string if no comment, or the comment. * The string is decoded with UTF-8 * - * @throws IOE if no valid end-of-central-directory record found + * @throws IOException if no valid end-of-central-directory record found */ public static String getComment(File file, int max, int skip) throws IOException { if (!file.exists())