diff --git a/core/java/src/gnu/crypto/prng/IRandomStandalone.java b/core/java/src/gnu/crypto/prng/IRandomStandalone.java index b8a13e432..9d7e81fd0 100644 --- a/core/java/src/gnu/crypto/prng/IRandomStandalone.java +++ b/core/java/src/gnu/crypto/prng/IRandomStandalone.java @@ -114,7 +114,7 @@ public interface IRandomStandalone extends Cloneable { * * @return the next 8 bits of random data generated from this instance. * @throws IllegalStateException if the instance is not yet initialised. - * @throws LimLimitReachedExceptionStandalone this instance has reached its + * @throws LimitReachedExceptionStandalone this instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ byte nextByte() throws IllegalStateException, LimitReachedExceptionStandalone; @@ -131,7 +131,7 @@ public interface IRandomStandalone extends Cloneable { * @param length the maximum number of required random bytes. This method * does nothing if this parameter is less than 1. * @throws IllegalStateException if the instance is not yet initialised. - * @throws LimitLimitReachedExceptionStandalonehis instance has reached its + * @throws LimitReachedExceptionStandalone this instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ void nextBytes(byte[] out, int offset, int length) diff --git a/core/java/src/net/i2p/data/SDSCache.java b/core/java/src/net/i2p/data/SDSCache.java index 2ab2e2649..2654af32d 100644 --- a/core/java/src/net/i2p/data/SDSCache.java +++ b/core/java/src/net/i2p/data/SDSCache.java @@ -25,7 +25,7 @@ import net.i2p.util.SystemVersion; * Following is sample usage: *
 
-    private static final SDSCache _cache = new SDSCache(Foo.class, LENGTH, 1024);
+    private static final SDSCache<Foo> _cache = new SDSCache(Foo.class, LENGTH, 1024);
 
     public static Foo create(byte[] data) {
         return _cache.get(data);
@@ -113,7 +113,7 @@ public class SDSCache {
      *  @return the cached value if available, otherwise
      *          makes a new object and returns it
      *  @throws IllegalArgumentException if data is not the correct number of bytes
-     *  @throws NPE
+     *  @throws NullPointerException
      */
     public V get(byte[] data) {
         if (data == null)
diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java
index 1f91da128..4049535f7 100644
--- a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java
+++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java
@@ -28,7 +28,7 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM
     }
 
     /**
-     * Validate the type and size of the message, and then read the message into the data structures.  

+ * Validate the type and size of the message, and then read the message into the data structures.

* * @throws IOException */ diff --git a/core/java/src/net/i2p/stat/Rate.java b/core/java/src/net/i2p/stat/Rate.java index edac7d96b..d12ece8aa 100644 --- a/core/java/src/net/i2p/stat/Rate.java +++ b/core/java/src/net/i2p/stat/Rate.java @@ -138,7 +138,7 @@ public class Rate { /** * Create a new rate and load its state from the properties, taking data - * from the data points underneath the given prefix.

+ * from the data points underneath the given prefix.

* (e.g. prefix = "profile.dbIntroduction.60m", this will load the associated data points such * as "profile.dbIntroduction.60m.lifetimeEventCount"). The data can be exported * through store(outputStream, "profile.dbIntroduction.60m"). diff --git a/router/java/src/net/i2p/data/i2np/I2NPMessage.java b/router/java/src/net/i2p/data/i2np/I2NPMessage.java index 8f1f72566..d1c739140 100644 --- a/router/java/src/net/i2p/data/i2np/I2NPMessage.java +++ b/router/java/src/net/i2p/data/i2np/I2NPMessage.java @@ -62,7 +62,6 @@ public interface I2NPMessage extends DataStructure { * starting at ID if type is >= 0 (15 byte header) * @return size of the message read (including headers) * @throws I2NPMessageException if there is no valid message - * @throws IOException if there is a problem reading from the stream */ public int readBytes(byte data[], int type, int offset) throws I2NPMessageException; @@ -79,7 +78,6 @@ public interface I2NPMessage extends DataStructure { * This includes the type byte only if type < 0 * @return size of the message read (including headers) * @throws I2NPMessageException if there is no valid message - * @throws IOException if there is a problem reading from the stream * @since 0.8.12 */ public int readBytes(byte data[], int type, int offset, int maxLen) throws I2NPMessageException; @@ -95,7 +93,6 @@ public interface I2NPMessage extends DataStructure { * @param type I2NP message type * @throws I2NPMessageException if the stream doesn't contain a valid message * that this class can read. - * @throws IOException if there is a problem reading from the stream */ public void readMessage(byte data[], int offset, int dataSize, int type) throws I2NPMessageException; public void readMessage(byte data[], int offset, int dataSize, int type, I2NPMessageHandler handler) throws I2NPMessageException; diff --git a/router/java/src/net/i2p/router/InNetMessagePool.java b/router/java/src/net/i2p/router/InNetMessagePool.java index 2337dbce6..b126815a0 100644 --- a/router/java/src/net/i2p/router/InNetMessagePool.java +++ b/router/java/src/net/i2p/router/InNetMessagePool.java @@ -92,7 +92,7 @@ public class InNetMessagePool implements Service { /** * @return previous builder for this message type, or null - * @throws AIOOBE if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE + * @throws ArrayIndexOutOfBoundsException if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE */ public synchronized HandlerJobBuilder registerHandlerJobBuilder(int i2npMessageType, HandlerJobBuilder builder) { HandlerJobBuilder old = _handlerJobBuilders[i2npMessageType]; @@ -102,7 +102,7 @@ public class InNetMessagePool implements Service { /** * @return previous builder for this message type, or null - * @throws AIOOBE if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE + * @throws ArrayIndexOutOfBoundsException if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE * @deprecated unused */ @Deprecated diff --git a/router/java/src/net/i2p/router/message/CloveSet.java b/router/java/src/net/i2p/router/message/CloveSet.java index d03289931..3b9fe3042 100644 --- a/router/java/src/net/i2p/router/message/CloveSet.java +++ b/router/java/src/net/i2p/router/message/CloveSet.java @@ -34,7 +34,7 @@ class CloveSet { public int getCloveCount() { return _cloves.length; } - /** @throws AIOOBE */ + /** @throws ArrayIndexOutOfBoundsException */ public GarlicClove getClove(int index) { return _cloves[index]; } public Certificate getCertificate() { return _cert; } diff --git a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java index 67ab00951..bdfb3385c 100644 --- a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java +++ b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java @@ -183,7 +183,7 @@ public class LoadClientAppsJob extends JobImpl { * * @param clientName can be null * @param args can be null - * @throws just about anything, caller would be wise to catch Throwable + * @throws Exception just about anything, caller would be wise to catch Throwable * @since 0.7.13 */ public static void runClientInline(String className, String clientName, String args[], Log log) throws Exception { diff --git a/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java b/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java index de804ae9f..b1d4d71d2 100644 --- a/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java +++ b/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java @@ -47,7 +47,7 @@ class OutboundMessageState implements CDPQEntry { * "injected" message from the establisher. * * Called from UDPTransport. - * @throws IAE if too big or if msg or peer is null + * @throws IllegalArgumentException if too big or if msg or peer is null */ public OutboundMessageState(I2PAppContext context, I2NPMessage msg, PeerState peer) { this(context, null, msg, peer); @@ -57,7 +57,7 @@ class OutboundMessageState implements CDPQEntry { * Normal constructor. * * Called from OutboundMessageFragments. - * @throws IAE if too big or if msg or peer is null + * @throws IllegalArgumentException if too big or if msg or peer is null */ public OutboundMessageState(I2PAppContext context, OutNetMessage m, PeerState peer) { this(context, m, m.getMessage(), peer); @@ -66,7 +66,7 @@ class OutboundMessageState implements CDPQEntry { /** * Internal. * @param m null if msg is "injected" - * @throws IAE if too big or if msg or peer is null + * @throws IllegalArgumentException if too big or if msg or peer is null */ private OutboundMessageState(I2PAppContext context, OutNetMessage m, I2NPMessage msg, PeerState peer) { if (msg == null || peer == null)