diff --git a/core/java/src/net/i2p/client/I2PClient.java b/core/java/src/net/i2p/client/I2PClient.java index 3942aeb6e..2b2474c91 100644 --- a/core/java/src/net/i2p/client/I2PClient.java +++ b/core/java/src/net/i2p/client/I2PClient.java @@ -47,7 +47,7 @@ public interface I2PClient { public static final SigType DEFAULT_SIGTYPE = SigType.DSA_SHA1; /** - * For router->client payloads. + * For router->client payloads. * * If false, the router will send the MessageStatus, * the client must respond with a ReceiveMessageBegin, diff --git a/core/java/src/net/i2p/client/I2PSession.java b/core/java/src/net/i2p/client/I2PSession.java index 818cb5983..069907d9c 100644 --- a/core/java/src/net/i2p/client/I2PSession.java +++ b/core/java/src/net/i2p/client/I2PSession.java @@ -73,7 +73,7 @@ public interface I2PSession { * End-to-End Crypto is disabled, tags and keys are ignored! * * Like sendMessage above, except the key used and the tags sent are exposed to the - * application.
+ * application.* * If some application layer message delivery confirmation is used, * rather than i2p's (slow) built in confirmation via guaranteed delivery mode, the @@ -331,7 +331,7 @@ public interface I2PSession { * Suggested implementation: * *
- * if (name.length() == 60 && name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
+ * if (name.length() == 60 && name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
* if (session != null)
* return session.lookup(Hash.create(Base32.decode(name.toLowerCase(Locale.US).substring(0, 52))));
* else
diff --git a/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java b/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java
index 4cea850b7..48d67b09f 100644
--- a/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java
+++ b/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java
@@ -27,7 +27,7 @@ import net.i2p.data.i2cp.SetDateMessage;
* @author jrandom
*/
class I2PClientMessageHandlerMap {
- /** map of message type id --> I2CPMessageHandler */
+ /** map of message type id --> I2CPMessageHandler */
protected I2CPMessageHandler _handlers[];
/** for extension */
diff --git a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
index c199fa8c6..021a2d901 100644
--- a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
+++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
@@ -124,7 +124,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
/** class that generates new messages */
protected final I2CPMessageProducer _producer;
- /** map of Long --> MessagePayloadMessage */
+ /** map of Long --> MessagePayloadMessage */
protected Map _availableMessages;
/** hashes of lookups we are waiting for */
diff --git a/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
index 9b6f1ff0c..049bd3d91 100644
--- a/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
+++ b/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
@@ -34,17 +34,17 @@ import net.i2p.util.Log;
* Therefore the compatibility situation is as follows:
*
* Compatibility:
- * old streaming -> new streaming: sends proto anything, rcvs proto anything
- * new streaming -> old streaming: sends PROTO_STREAMING, ignores rcvd proto
- * old datagram -> new datagram: sends proto anything, rcvs proto anything
- * new datagram -> old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
+ * old streaming -> new streaming: sends proto anything, rcvs proto anything
+ * new streaming -> old streaming: sends PROTO_STREAMING, ignores rcvd proto
+ * old datagram -> new datagram: sends proto anything, rcvs proto anything
+ * new datagram -> old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
* In all the above cases, streaming and datagram receive traffic for the other
* protocol, same as before.
*
- * old datagram -> new muxed: doesn't work because the old sends proto 0 but the udp side
+ * old datagram -> new muxed: doesn't work because the old sends proto 0 but the udp side
* of the mux registers with PROTO_DATAGRAM, so the datagrams
* go to the streaming side, same as before.
- * old streaming -> new muxed: works
+ * old streaming -> new muxed: works
*
* Typical Usage:
* Streaming + datagrams:
@@ -421,7 +421,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 {
/**
* No, we couldn't put any protocol byte in front of everything and
* keep backward compatibility. But there are several bytes that
- * are unused AND unchecked in the gzip header in releases <= 0.7.
+ * are unused AND unchecked in the gzip header in releases <= 0.7.
* So let's use 5 of them for a protocol and two 2-byte ports.
*
* Following are all the methods to hide the
diff --git a/core/java/src/net/i2p/crypto/SHA1.java b/core/java/src/net/i2p/crypto/SHA1.java
index bfe07630c..e64a4da0b 100644
--- a/core/java/src/net/i2p/crypto/SHA1.java
+++ b/core/java/src/net/i2p/crypto/SHA1.java
@@ -28,8 +28,8 @@ import net.i2p.util.SystemVersion;
*
* The FIPS PUB 180-2 standard specifies four secure hash algorithms (SHA-1,
* SHA-256, SHA-384 and SHA-512) for computing a condensed representation of
- * electronic data (message). When a message of any length < 2^^64 bits (for
- * SHA-1 and SHA-256) or < 2^^128 bits (for SHA-384 and SHA-512) is input to
+ * electronic data (message). When a message of any length < 2^^64 bits (for
+ * SHA-1 and SHA-256) or < 2^^128 bits (for SHA-384 and SHA-512) is input to
* an algorithm, the result is an output called a message digest. The message
* digests range in length from 160 to 512 bits, depending on the algorithm.
* Secure hash algorithms are typically used with other cryptographic
diff --git a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java
index 75e1196dd..670da6471 100644
--- a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java
+++ b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java
@@ -18,22 +18,22 @@ public class Ed25519LittleEndianEncoding extends Encoding {
* Assumption:
*
* - p = 2^255 - 19
- *
- h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 <= |hi| < 2^27 for all i=0,...,9.
- *
- h congruent r modulo p, i.e. h = r + q * p for some suitable 0 <= r < p and an integer q.
+ *
- h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 <= |hi| < 2^27 for all i=0,...,9.
+ *
- h congruent r modulo p, i.e. h = r + q * p for some suitable 0 <= r < p and an integer q.
*
* Then q = [2^-255 * (h + 19 * 2^-25 * h9 + 1/2)] where [x] = floor(x).
*
* Proof:
*
* We begin with some very raw estimation for the bounds of some expressions:
- *
|h| < 2^230 * 2^30 = 2^260 ==> |r + q * p| < 2^260 ==> |q| < 2^10.
- * ==> -1/4 <= a := 19^2 * 2^-255 * q < 1/4.
- * |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| < 2^204 * 2^30 = 2^234.
- * ==> -1/4 <= b := 19 * 2^-255 * (h - 2^230 * h9) < 1/4
- * Therefore 0 < 1/2 - a - b < 1.
+ * |h| < 2^230 * 2^30 = 2^260 ==> |r + q * p| < 2^260 ==> |q| < 2^10.
+ * ==> -1/4 <= a := 19^2 * 2^-255 * q < 1/4.
+ * |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| < 2^204 * 2^30 = 2^234.
+ * ==> -1/4 <= b := 19 * 2^-255 * (h - 2^230 * h9) < 1/4
+ * Therefore 0 < 1/2 - a - b < 1.
*
* Set x := r + 19 * 2^-255 * r + 1/2 - a - b then
- * 0 <= x < 255 - 20 + 19 + 1 = 2^255 ==> 0 <= 2^-255 * x < 1. Since q is an integer we have
+ * 0 <= x < 255 - 20 + 19 + 1 = 2^255 ==> 0 <= 2^-255 * x < 1. Since q is an integer we have
*
*
[q + 2^-255 * x] = q (1)
*
diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java
index bd30d1c34..0d1ecf496 100644
--- a/core/java/src/net/i2p/data/SigningPublicKey.java
+++ b/core/java/src/net/i2p/data/SigningPublicKey.java
@@ -150,7 +150,7 @@ public class SigningPublicKey extends SimpleDataStructure {
* Get the portion of this (type 0) SPK that is really padding based on the Key Cert type given,
* if any
*
- * @return leading padding length > 0 or null if no padding or type is unknown
+ * @return leading padding length > 0 or null if no padding or type is unknown
* @throws IllegalArgumentException if this is already typed to a different type
* @since 0.9.12
*/
diff --git a/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java b/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java
index 6d172c919..4562ba93f 100644
--- a/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java
+++ b/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java
@@ -44,7 +44,7 @@ public class RequestVariableLeaseSetMessage extends I2CPMessageImpl {
* Does the client support this message?
*
* @param clientVersion may be null
- * @return version != null and version >= 0.9.7
+ * @return version != null and version >= 0.9.7
*/
public static boolean isSupported(String clientVersion) {
return clientVersion != null &&
diff --git a/core/java/src/net/i2p/kademlia/KBucketSet.java b/core/java/src/net/i2p/kademlia/KBucketSet.java
index 09b51ca23..f8ce16f19 100644
--- a/core/java/src/net/i2p/kademlia/KBucketSet.java
+++ b/core/java/src/net/i2p/kademlia/KBucketSet.java
@@ -72,9 +72,9 @@ public class KBucketSet {
* Use the default trim strategy, which removes a random entry.
* @param us the local identity (typically a SHA1Hash or Hash)
* The class must have a zero-argument constructor.
- * @param max the Kademlia value "k", the max per bucket, k >= 4
+ * @param max the Kademlia value "k", the max per bucket, k >= 4
* @param b the Kademlia value "b", split buckets an extra 2**(b-1) times,
- * b > 0, use 1 for bittorrent, Kademlia paper recommends 5
+ * b > 0, use 1 for bittorrent, Kademlia paper recommends 5
*/
public KBucketSet(I2PAppContext context, T us, int max, int b) {
this(context, us, max, b, new RandomTrimmer(context, max));
@@ -168,7 +168,7 @@ public class KBucketSet {
/**
* No lock required.
- * FIXME will split the closest buckets too far if B > 1 and K < 2**B
+ * FIXME will split the closest buckets too far if B > 1 and K < 2**B
* Won't ever really happen and if it does it still works.
*/
private boolean shouldSplit(KBucket b) {
@@ -625,7 +625,7 @@ public class KBucketSet {
/**
* Make a new SimpleDataStrucure from the data
- * @param data size <= SDS length, else throws IAE
+ * @param data size <= SDS length, else throws IAE
* Can be 1 bigger if top byte is zero
*/
@SuppressWarnings("unchecked")
diff --git a/core/java/src/net/i2p/stat/RateAverages.java b/core/java/src/net/i2p/stat/RateAverages.java
index 375bf0af8..fbd491ba7 100644
--- a/core/java/src/net/i2p/stat/RateAverages.java
+++ b/core/java/src/net/i2p/stat/RateAverages.java
@@ -38,10 +38,10 @@ public class RateAverages {
/**
* @since 0.9.4
* @return one of several things:
- * if there are any events (current or last) => weighted average
+ * if there are any events (current or last) => weighted average
* otherwise if the useLifetime parameter to Rate.computeAverages was:
- * true => the lifetime average value
- * false => zero
+ * true => the lifetime average value
+ * false => zero
*/
public double getAverage() {
return average;
diff --git a/core/java/src/net/i2p/util/EventDispatcher.java b/core/java/src/net/i2p/util/EventDispatcher.java
index 04e3731b6..3128821cc 100644
--- a/core/java/src/net/i2p/util/EventDispatcher.java
+++ b/core/java/src/net/i2p/util/EventDispatcher.java
@@ -13,7 +13,7 @@ import java.util.Set;
/**
* Event dispatching interface. It allows objects to receive and
- * notify data events (basically String->Object associations) and
+ * notify data events (basically String->Object associations) and
* create notification chains. To ease the usage of this interface,
* you could define an EventDispatcherImpl attribute called
* _event (as suggested in EventDispatcherImpl documentation)
diff --git a/core/java/src/net/i2p/util/InternalServerSocket.java b/core/java/src/net/i2p/util/InternalServerSocket.java
index 77cf8c792..51cb6c686 100644
--- a/core/java/src/net/i2p/util/InternalServerSocket.java
+++ b/core/java/src/net/i2p/util/InternalServerSocket.java
@@ -31,7 +31,7 @@ public class InternalServerSocket extends ServerSocket {
//private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class);
/**
- * @param port > 0
+ * @param port > 0
*/
public InternalServerSocket(int port) throws IOException {
if (port <= 0)
@@ -87,7 +87,7 @@ public class InternalServerSocket extends ServerSocket {
/**
* This is how the client connects.
*
- * @param port > 0
+ * @param port > 0
*/
static void internalConnect(int port, InternalSocket clientSock) throws IOException {
InternalServerSocket iss = _sockets.get(Integer.valueOf(port));
diff --git a/core/java/src/net/i2p/util/InternalSocket.java b/core/java/src/net/i2p/util/InternalSocket.java
index a60a53ae9..8ee9ca3cc 100644
--- a/core/java/src/net/i2p/util/InternalSocket.java
+++ b/core/java/src/net/i2p/util/InternalSocket.java
@@ -26,7 +26,7 @@ public class InternalSocket extends Socket {
/**
* client side
- * @param port > 0
+ * @param port > 0
*/
public InternalSocket(int port) throws IOException {
if (port <= 0)
@@ -36,7 +36,7 @@ public class InternalSocket extends Socket {
/**
* Convenience method to return either a Socket or an InternalSocket
- * @param port > 0
+ * @param port > 0
*/
public static Socket getSocket(String host, int port) throws IOException {
if (System.getProperty("router.version") != null &&
diff --git a/core/java/src/net/i2p/util/ObjectCounter.java b/core/java/src/net/i2p/util/ObjectCounter.java
index bbe3f58e3..ff00a8e39 100644
--- a/core/java/src/net/i2p/util/ObjectCounter.java
+++ b/core/java/src/net/i2p/util/ObjectCounter.java
@@ -44,7 +44,7 @@ public class ObjectCounter implements Serializable {
}
/**
- * @return set of objects with counts > 0
+ * @return set of objects with counts > 0
*/
public Set objects() {
return this.map.keySet();
diff --git a/core/java/src/net/i2p/util/PortMapper.java b/core/java/src/net/i2p/util/PortMapper.java
index 1a622828b..5dcf55c1b 100644
--- a/core/java/src/net/i2p/util/PortMapper.java
+++ b/core/java/src/net/i2p/util/PortMapper.java
@@ -50,7 +50,7 @@ public class PortMapper {
/**
* Add the service
- * @param port > 0
+ * @param port > 0
* @return success, false if already registered
*/
public boolean register(String service, int port) {
@@ -59,7 +59,7 @@ public class PortMapper {
/**
* Add the service
- * @param port > 0
+ * @param port > 0
* @return success, false if already registered
* @since 0.9.21
*/
diff --git a/core/java/src/net/i2p/util/SimpleTimer2.java b/core/java/src/net/i2p/util/SimpleTimer2.java
index 710ebdb3c..15a844a7e 100644
--- a/core/java/src/net/i2p/util/SimpleTimer2.java
+++ b/core/java/src/net/i2p/util/SimpleTimer2.java
@@ -208,8 +208,8 @@ public class SimpleTimer2 {
* state of a given TimedEvent
*
* valid transitions:
- * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> RUNNING -> {IDLE,CANCELLED,SCHEDULED}
- * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> CANCELLED
+ * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> RUNNING -> {IDLE,CANCELLED,SCHEDULED}
+ * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> CANCELLED
*
* anything else is invalid.
*/
@@ -231,10 +231,10 @@ public class SimpleTimer2 {
* in your constructor)
*
* Other porting:
- * SimpleTimer.getInstance().addEvent(new foo(), timeout) => new foo(SimpleTimer2.getInstance(), timeout)
- * SimpleTimer.getInstance().addEvent(this, timeout) => schedule(timeout)
- * SimpleTimer.getInstance().addEvent(foo, timeout) => foo.reschedule(timeout)
- * SimpleTimer.getInstance().removeEvent(foo) => foo.cancel()
+ * SimpleTimer.getInstance().addEvent(new foo(), timeout) => new foo(SimpleTimer2.getInstance(), timeout)
+ * SimpleTimer.getInstance().addEvent(this, timeout) => schedule(timeout)
+ * SimpleTimer.getInstance().addEvent(foo, timeout) => foo.reschedule(timeout)
+ * SimpleTimer.getInstance().removeEvent(foo) => foo.cancel()
*
* There's no global locking, but for scheduling, we synchronize on this
* to reduce the chance of duplicates on the queue.
diff --git a/core/java/src/net/i2p/util/SystemVersion.java b/core/java/src/net/i2p/util/SystemVersion.java
index bd159fb1a..9bf6f49c3 100644
--- a/core/java/src/net/i2p/util/SystemVersion.java
+++ b/core/java/src/net/i2p/util/SystemVersion.java
@@ -149,7 +149,7 @@ public abstract class SystemVersion {
}
/**
- * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") >= 0
+ * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") >= 0
* as it handles Android also, where java.version = "0".
*
* @return true if Java 1.6 or higher, or Android API 9 or higher
@@ -159,7 +159,7 @@ public abstract class SystemVersion {
}
/**
- * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") >= 0
+ * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") >= 0
* as it handles Android also, where java.version = "0".
*
* @return true if Java 1.7 or higher, or Android API 19 or higher
@@ -193,8 +193,8 @@ public abstract class SystemVersion {
* http://mark.koli.ch/2009/10/javas-osarch-system-property-is-the-bitness-of-the-jre-not-the-operating-system.html
* http://mark.koli.ch/2009/10/reliably-checking-os-bitness-32-or-64-bit-on-windows-with-a-tiny-c-app.html
* sun.arch.data.model not on all JVMs
- * sun.arch.data.model == 64 => 64 bit processor
- * sun.arch.data.model == 32 => A 32 bit JVM but could be either 32 or 64 bit processor or libs
+ * sun.arch.data.model == 64 => 64 bit processor
+ * sun.arch.data.model == 32 => A 32 bit JVM but could be either 32 or 64 bit processor or libs
* os.arch contains "64" could be 32 or 64 bit libs
*/
public static boolean is64Bit() {
diff --git a/core/java/src/net/i2p/util/Translate.java b/core/java/src/net/i2p/util/Translate.java
index dd76f04e8..0c42f8056 100644
--- a/core/java/src/net/i2p/util/Translate.java
+++ b/core/java/src/net/i2p/util/Translate.java
@@ -67,7 +67,7 @@ public abstract class Translate {
*
* @param s string to be translated containing {0}
* The {0} will be replaced by the parameter.
- * Single quotes must be doubled, i.e. ' -> '' in the string.
+ * Single quotes must be doubled, i.e. ' -> '' in the string.
* @param o parameter, not translated.
* To translate parameter also, use _t("foo {0} bar", _t("baz"))
* Do not double the single quotes in the parameter.