From d196047382ee86f0b124cd7e598b0f869996c540 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Thu, 26 Jan 2017 21:45:47 +0000
Subject: [PATCH] javadoc fixes part 6 (ticket #1894)

---
 core/java/src/gnu/crypto/prng/IRandomStandalone.java        | 4 ++--
 core/java/src/net/i2p/data/SDSCache.java                    | 4 ++--
 core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java        | 2 +-
 core/java/src/net/i2p/stat/Rate.java                        | 2 +-
 router/java/src/net/i2p/data/i2np/I2NPMessage.java          | 3 ---
 router/java/src/net/i2p/router/InNetMessagePool.java        | 4 ++--
 router/java/src/net/i2p/router/message/CloveSet.java        | 2 +-
 .../java/src/net/i2p/router/startup/LoadClientAppsJob.java  | 2 +-
 .../net/i2p/router/transport/udp/OutboundMessageState.java  | 6 +++---
 9 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/core/java/src/gnu/crypto/prng/IRandomStandalone.java b/core/java/src/gnu/crypto/prng/IRandomStandalone.java
index b8a13e4323..9d7e81fd02 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 <code>1</code>.
      * @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 2ab2e26496..2654af32df 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:
  *  <pre>
 
-    private static final SDSCache<Foo> _cache = new SDSCache(Foo.class, LENGTH, 1024);
+    private static final SDSCache&lt;Foo&gt; _cache = new SDSCache(Foo.class, LENGTH, 1024);
 
     public static Foo create(byte[] data) {
         return _cache.get(data);
@@ -113,7 +113,7 @@ public class SDSCache<V extends SimpleDataStructure> {
      *  @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 1f91da128d..4049535f71 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.  <p />
+     * Validate the type and size of the message, and then read the message into the data structures.  <p>
      *
      * @throws IOException 
      */
diff --git a/core/java/src/net/i2p/stat/Rate.java b/core/java/src/net/i2p/stat/Rate.java
index edac7d96b6..d12ece8aa0 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.  <p />
+     * from the data points underneath the given prefix.  <p>
      * (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 8f1f725660..d1c7391402 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 &gt;= 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 &lt; 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 2337dbce6d..b126815a0e 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 d03289931a..3b9fe30420 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 67ab009519..bdfb3385cf 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 de804ae9fb..b1d4d71d2a 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)
-- 
GitLab