From fb74f41692947033def107113c4a7bd6f9ca2de3 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Fri, 27 Jan 2017 01:41:06 +0000 Subject: [PATCH] javadoc fixes part 9 (ticket #1894) --- .../src/net/i2p/client/streaming/I2PSocketAddress.java | 8 ++++---- .../net/i2p/client/streaming/I2PSocketException.java | 2 +- .../src/net/i2p/client/streaming/I2PSocketManager.java | 2 +- .../i2p/client/streaming/I2PSocketManagerFactory.java | 10 +++++----- .../src/net/i2p/client/streaming/I2PSocketOptions.java | 4 ++-- .../src/net/i2p/client/streaming/impl/Connection.java | 10 +++++----- .../client/streaming/impl/ConnectionDataReceiver.java | 4 ++-- .../client/streaming/impl/ConnectionPacketHandler.java | 2 +- .../client/streaming/impl/I2PSocketManagerFull.java | 2 +- .../client/streaming/impl/I2PSocketOptionsImpl.java | 4 ++-- .../net/i2p/client/streaming/impl/MessageHandler.java | 4 ++-- .../i2p/client/streaming/impl/MessageInputStream.java | 6 +++--- .../i2p/client/streaming/impl/MessageOutputStream.java | 4 ++-- .../java/src/net/i2p/client/streaming/impl/Packet.java | 2 +- .../net/i2p/client/streaming/impl/PacketHandler.java | 4 ++-- .../src/net/i2p/client/streaming/impl/PacketQueue.java | 4 ++-- .../net/i2p/client/streaming/impl/StandardSocket.java | 2 +- .../java/src/net/i2p/router/util/DecayingHashSet.java | 4 ++-- .../src/org/xlattice/crypto/filters/KeySelector.java | 2 +- 19 files changed, 40 insertions(+), 40 deletions(-) diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java index 7b35e7a6c2..8b8f504638 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java @@ -26,7 +26,7 @@ public class I2PSocketAddress extends SocketAddress { * Does a naming service lookup to resolve the dest. * May take several seconds for b32. * @param host hostname or b64 dest or b32, may have :port appended - * @throws IllegalArgumentException for port < 0 or port > 65535 or invalid port + * @throws IllegalArgumentException for port < 0 or port > 65535 or invalid port * @since 0.9.9 */ public I2PSocketAddress(String host) { @@ -51,7 +51,7 @@ public class I2PSocketAddress extends SocketAddress { /** * Does not do a reverse lookup. Host will be null. - * @throws IllegalArgumentException for port < 0 or port > 65535 + * @throws IllegalArgumentException for port < 0 or port > 65535 */ public I2PSocketAddress(Destination dest, int port) { if (dest == null) @@ -66,7 +66,7 @@ public class I2PSocketAddress extends SocketAddress { /** * Does a naming service lookup to resolve the dest. * May take several seconds for b32. - * @throws IllegalArgumentException for port < 0 or port > 65535 + * @throws IllegalArgumentException for port < 0 or port > 65535 */ public I2PSocketAddress(String host, int port) { if (port < 0 || port > 65535) @@ -77,7 +77,7 @@ public class I2PSocketAddress extends SocketAddress { } /** - * @throws IllegalArgumentException for port < 0 or port > 65535 + * @throws IllegalArgumentException for port < 0 or port > 65535 */ public static I2PSocketAddress createUnresolved(String host, int port) { return new I2PSocketAddress(port, host); diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java index 4be4d532b0..a4532debc6 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java @@ -32,7 +32,7 @@ public class I2PSocketException extends SocketException { * Standard codes from client-side I2CP are 256-511, defined in SendMessageStatusListener. * Standard codes from streaming are 512-767, defined here. * - * @param status >= 0 from MessageStatusMessage or SendMessageStatusListener + * @param status >= 0 from MessageStatusMessage or SendMessageStatusListener */ public I2PSocketException(int status) { super(); diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java index a969581bd0..ab183a8172 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java @@ -240,7 +240,7 @@ public interface I2PSocketManager { /** * Like connect() but returns a real Socket, and throws only IOE, * for easier porting of apps. - * @param timeout ms if > 0, forces blocking (disables connectDelay) + * @param timeout ms if > 0, forces blocking (disables connectDelay) * @since 0.8.4 */ public Socket connectToSocket(Destination peer, int timeout) throws IOException; diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java index 466c8c88af..3490f18e3c 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java @@ -80,7 +80,7 @@ public class I2PSocketManagerFactory { * The nonblocking createDisconnectedManager() is preferred. * * @param host I2CP host null to use default, ignored if in router context - * @param port I2CP port <= 0 to use default, ignored if in router context + * @param port I2CP port <= 0 to use default, ignored if in router context * @return the newly created socket manager, or null if there were errors */ public static I2PSocketManager createManager(String host, int port) { @@ -95,7 +95,7 @@ public class I2PSocketManagerFactory { * The nonblocking createDisconnectedManager() is preferred. * * @param i2cpHost I2CP host null to use default, ignored if in router context - * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context + * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context * @param opts Streaming and I2CP options, may be null * @return the newly created socket manager, or null if there were errors */ @@ -157,7 +157,7 @@ public class I2PSocketManagerFactory { * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * or null for a transient destination. Caller must close. * @param i2cpHost I2CP host null to use default, ignored if in router context - * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context + * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context * @param opts Streaming and I2CP options, may be null * @return the newly created socket manager, or null if there were errors */ @@ -184,7 +184,7 @@ public class I2PSocketManagerFactory { * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * or null for a transient destination. Caller must close. * @param i2cpHost I2CP host null to use default, ignored if in router context - * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context + * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context * @param opts Streaming and I2CP options, may be null * @return the newly created socket manager, non-null (throws on error) * @since 0.9.8 @@ -216,7 +216,7 @@ public class I2PSocketManagerFactory { * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * non-null. Caller must close. * @param i2cpHost I2CP host null to use default, ignored if in router context - * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context + * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context * @param opts Streaming and I2CP options, may be null * @param connect true to connect (blocking) * @return the newly created socket manager, non-null (throws on error) diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java index 692c04f7b6..685b910bb3 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java @@ -18,7 +18,7 @@ public interface I2PSocketOptions { * How long we will wait for the ACK from a SYN, in milliseconds. * * Default 60 seconds. Max of 2 minutes enforced in Connection.java, - * and it also interprets <= 0 as default. + * and it also interprets <= 0 as default. * * @return milliseconds to wait, or -1 if we will wait indefinitely */ @@ -28,7 +28,7 @@ public interface I2PSocketOptions { * Define how long we will wait for the ACK from a SYN, in milliseconds. * * Default 60 seconds. Max of 2 minutes enforced in Connection.java, - * and it also interprets <= 0 as default. + * and it also interprets <= 0 as default. * * @param ms timeout in ms */ diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java index 0d295d73cf..1e33c793b6 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java @@ -177,7 +177,7 @@ class Connection { * * @param timeoutMs 0 or negative means wait forever, 5 minutes max * @return true if the packet should be sent, false for a fatal error - * will return false after 5 minutes even if timeoutMs is <= 0. + * will return false after 5 minutes even if timeoutMs is <= 0. */ public boolean packetSendChoke(long timeoutMs) throws IOException, InterruptedException { long start = _context.clock().now(); @@ -635,7 +635,7 @@ class Connection { /** * Always true at the start, even if we haven't gotten a reply on an * outbound connection. Only set to false on disconnect. - * For outbound, use getHighestAckedThrough() >= 0 also, + * For outbound, use getHighestAckedThrough() >= 0 also, * to determine if the connection is up. * * In general, this is true until either: @@ -961,9 +961,9 @@ class Connection { } /** - * If the next send time is currently >= 0 (i.e. not "never"), + * If the next send time is currently >= 0 (i.e. not "never"), * this may make the next time sooner but will not make it later. - * If the next send time is currently < 0 (i.e. "never"), + * If the next send time is currently < 0 (i.e. "never"), * this will set it to the time specified, but not later than * options.getSendAckDelay() from now (1000 ms) */ @@ -1328,7 +1328,7 @@ class Connection { * we have to use forceReschedule() instead of schedule() below, * to prevent duplicates in the timer queue. * - * don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel + * don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel * * @return true if the packet was sent, false if it was not */ diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java index 6836cd74ae..c8098024c4 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java @@ -11,7 +11,7 @@ import net.i2p.util.Log; * delivery, or even the generation of a new packet. This class * is the only one that builds useful outbound Packet objects. *<p> - * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession + * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession *<p> * There's one of these per MessageOutputStream. * It stores no state. It sends everything to the Connection unless @@ -36,7 +36,7 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver { * This tells the flusher in MessageOutputStream whether to flush. * It won't flush if this returns true. * - * It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle) + * It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle) * But then, for data that fills more than one packet, the last part of * the data isn't sent until all the previous packets are acked. Which is very slow. * The poor interaction of Nagle and Delayed Acknowledgements is well-documented. diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java index 9372c69131..bb5dd63f4b 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java @@ -13,7 +13,7 @@ import net.i2p.util.SimpleTimer; * Receive a packet for a particular connection - placing the data onto the * queue, marking packets as acked, updating various fields, etc. *<p> - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream *<p> * One of these is instantiated per-Destination * (i.e. per-ConnectionManager, not per-Connection). diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java index ae9fb0ef55..94a4c4ae64 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java @@ -632,7 +632,7 @@ public class I2PSocketManagerFull implements I2PSocketManager { /** * Like connect() but returns a real Socket, and throws only IOE, * for easier porting of apps. - * @param timeout ms if > 0, forces blocking (disables connectDelay) + * @param timeout ms if > 0, forces blocking (disables connectDelay) * @since 0.8.4 */ public Socket connectToSocket(Destination peer, int timeout) throws IOException { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java index 63401f92dd..b357698599 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java @@ -122,7 +122,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions { * How long we will wait for the ACK from a SYN, in milliseconds. * * Default 60 seconds. Max of 2 minutes enforced in Connection.java, - * and it also interprets <= 0 as default. + * and it also interprets <= 0 as default. * * @return milliseconds to wait, or -1 if we will wait indefinitely */ @@ -134,7 +134,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions { * Define how long we will wait for the ACK from a SYN, in milliseconds. * * Default 60 seconds. Max of 2 minutes enforced in Connection.java, - * and it also interprets <= 0 as default. + * and it also interprets <= 0 as default. * */ public void setConnectTimeout(long ms) { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java index c14688050f..477f7476fd 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java @@ -14,8 +14,8 @@ import net.i2p.util.Log; /** * Receive raw information from the I2PSession and turn it into * Packets, if we can. - *<p> - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + *<p> + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream */ class MessageHandler implements I2PSessionMuxedListener { private final ConnectionManager _manager; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java index a77d282fe5..adf401a343 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java @@ -16,9 +16,9 @@ import net.i2p.util.Log; /** * Stream that can be given messages out of order * yet present them in order. - *<p> - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream - *<p> + *<p> + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + *<p> * This buffers unlimited data via messageReceived() - * limiting / blocking is done in ConnectionPacketHandler.receivePacket(). * diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java index 59c6de87bf..b5f1113d9e 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java @@ -16,8 +16,8 @@ import net.i2p.util.SimpleTimer2; * A stream that we can shove data into that fires off those bytes * on flush or when the buffer is full. It also blocks according * to the data receiver's needs. - *<p> - * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession + *<p> + * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession */ class MessageOutputStream extends OutputStream { private final I2PAppContext _context; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java index 483a8d4eed..b9b7397021 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java @@ -232,7 +232,7 @@ class Packet { } /** - * @param id if < 0, sets FLAG_NO_ACK + * @param id if < 0, sets FLAG_NO_ACK */ public void setAckThrough(long id) { if (id < 0) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java index 4a96693b4b..7ca70cd278 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java @@ -11,8 +11,8 @@ import net.i2p.util.Log; /** * receive a packet and dispatch it correctly to the connection specified, * the server socket, or queue a reply RST packet. - *<p> - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + *<p> + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream */ class PacketHandler { private final ConnectionManager _manager; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java index 943a0c03f5..b54b05c18f 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java @@ -23,8 +23,8 @@ import net.i2p.util.SimpleTimer2; * Well, thats the theory at least... in practice we just * send them immediately with no blocking, since the * mode=bestEffort doesnt block in the SDK. - *<p> - * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession + *<p> + * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession */ class PacketQueue implements SendMessageStatusListener, Closeable { private final I2PAppContext _context; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java index 0a1fb093e6..f73930d011 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java @@ -21,7 +21,7 @@ import net.i2p.client.streaming.I2PSocketOptions; * null for some methods. * * StandardSockets are always bound, and always start out connected - * (unless connectDelay is > 0). + * (unless connectDelay is > 0). * You may not create an unbound StandardSocket. * Create this through the SocketManager. * diff --git a/router/java/src/net/i2p/router/util/DecayingHashSet.java b/router/java/src/net/i2p/router/util/DecayingHashSet.java index ea955bcb1f..bdf8d275dd 100644 --- a/router/java/src/net/i2p/router/util/DecayingHashSet.java +++ b/router/java/src/net/i2p/router/util/DecayingHashSet.java @@ -43,7 +43,7 @@ import net.i2p.util.Log; * to implement something with a zero false positive rate, and uses less memory * for almost all bandwidth classes. * - * This has a strictly zero false positive rate for <= 8 byte keys. + * This has a strictly zero false positive rate for <= 8 byte keys. * For larger keys, it is 1 / (2**64) ~= 5E-20, which is better than * DBF for any entry count greater than about 14K. * @@ -208,7 +208,7 @@ public class DecayingHashSet extends DecayingBloomFilter { } /** - * This saves the data as-is if the length is <= 8 bytes, + * This saves the data as-is if the length is <= 8 bytes, * otherwise it stores an 8-byte hash. * Hash function is from DataHelper, modded to get * the maximum entropy given the length of the data. diff --git a/router/java/src/org/xlattice/crypto/filters/KeySelector.java b/router/java/src/org/xlattice/crypto/filters/KeySelector.java index 878e40758c..f734b8decf 100644 --- a/router/java/src/org/xlattice/crypto/filters/KeySelector.java +++ b/router/java/src/org/xlattice/crypto/filters/KeySelector.java @@ -61,7 +61,7 @@ public class KeySelector { * Note that if k and m are too big, the GenericWordSelector blows up - * The max for 32-byte keys is m=23 and k=11. * The precise restriction appears to be: - * ((5k + (k-1)(m-5)) / 8) + 2 < keySizeInBytes + * ((5k + (k-1)(m-5)) / 8) + 2 < keySizeInBytes * * It isn't clear how to fix this. */ -- GitLab