diff --git a/core/java/src/net/i2p/data/i2cp/AbuseReason.java b/core/java/src/net/i2p/data/i2cp/AbuseReason.java index 019e916b1b7c99deecb0a59389858c122bb84549..d1d87a3a912d6c31171507b0ae426f62fa71880e 100644 --- a/core/java/src/net/i2p/data/i2cp/AbuseReason.java +++ b/core/java/src/net/i2p/data/i2cp/AbuseReason.java @@ -49,15 +49,18 @@ public class AbuseReason extends DataStructureImpl { DataHelper.writeString(out, _reason); } + @Override public boolean equals(Object object) { if ((object == null) || !(object instanceof AbuseReason)) return false; return DataHelper.eq(getReason(), ((AbuseReason) object).getReason()); } + @Override public int hashCode() { return DataHelper.hashCode(getReason()); } + @Override public String toString() { return "[AbuseReason: " + getReason() + "]"; } diff --git a/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java b/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java index 218ade0706b17bb2a0a0df0e6e237d51c8b6a736..2f9140e08dab2732720c7fac7252db8710381b68 100644 --- a/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java +++ b/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java @@ -50,15 +50,18 @@ public class AbuseSeverity extends DataStructureImpl { DataHelper.writeLong(out, 1, _severityId); } + @Override public boolean equals(Object object) { if ((object == null) || !(object instanceof AbuseSeverity)) return false; return DataHelper.eq(getSeverity(), ((AbuseSeverity) object).getSeverity()); } + @Override public int hashCode() { return getSeverity(); } + @Override public String toString() { return "[AbuseSeverity: " + getSeverity() + "]"; } diff --git a/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java b/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java index 25c5f79459620ddcd3c3cfc5056b8fbac4c8a604..2d1643c9766144d056e210fb3c6be5023906c4b4 100644 --- a/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java +++ b/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java @@ -111,6 +111,7 @@ public class CreateLeaseSetMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof CreateLeaseSetMessage)) { CreateLeaseSetMessage msg = (CreateLeaseSetMessage) object; @@ -123,6 +124,7 @@ public class CreateLeaseSetMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[CreateLeaseSetMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java b/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java index 9a67a6184fad3b9b8281a1cb22dcac83c502f590..e86261438503a924c1f15936ddaa9afcd84ccf12 100644 --- a/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java +++ b/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java @@ -70,6 +70,7 @@ public class CreateSessionMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof CreateSessionMessage)) { CreateSessionMessage msg = (CreateSessionMessage) object; @@ -79,6 +80,7 @@ public class CreateSessionMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[CreateSessionMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/DestroySessionMessage.java b/core/java/src/net/i2p/data/i2cp/DestroySessionMessage.java index ca7c7580f8edf5ce684982a8ba7549bba0f7ee90..8fc0e2dbc7a3f2fb9828eca64b6134cf10c6e5d0 100644 --- a/core/java/src/net/i2p/data/i2cp/DestroySessionMessage.java +++ b/core/java/src/net/i2p/data/i2cp/DestroySessionMessage.java @@ -66,6 +66,7 @@ public class DestroySessionMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof DestroySessionMessage)) { DestroySessionMessage msg = (DestroySessionMessage) object; @@ -75,6 +76,7 @@ public class DestroySessionMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[DestroySessionMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java b/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java index 21477ad7f133981bf72fed199986613fe66e2bdd..143a76203cc991f238169ab2f2a9ce891583a2db 100644 --- a/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java +++ b/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java @@ -62,6 +62,7 @@ public class DisconnectMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof DisconnectMessage)) { DisconnectMessage msg = (DisconnectMessage) object; @@ -71,6 +72,7 @@ public class DisconnectMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[DisconnectMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/GetDateMessage.java b/core/java/src/net/i2p/data/i2cp/GetDateMessage.java index 9b0da7a0d51651a831c13c916d65b29503e346b9..8e90cef67460720f220c2c0eb13dc5f5ed237132 100644 --- a/core/java/src/net/i2p/data/i2cp/GetDateMessage.java +++ b/core/java/src/net/i2p/data/i2cp/GetDateMessage.java @@ -39,6 +39,7 @@ public class GetDateMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof GetDateMessage)) { return true; @@ -47,6 +48,7 @@ public class GetDateMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[GetDateMessage]"); diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessage.java b/core/java/src/net/i2p/data/i2cp/I2CPMessage.java index 412a3ffbc3a6ac9949ef14089eb387080c4f36b3..92c4f61631613bea69a064734e9c3194a1332bd8 100644 --- a/core/java/src/net/i2p/data/i2cp/I2CPMessage.java +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessage.java @@ -52,6 +52,7 @@ public interface I2CPMessage extends DataStructure { * Write the current message to the output stream as a full message following * the specification from the I2CP definition. * + * @param out OutputStream * @throws I2CPMessageException if the current object doesn't have sufficient data * to write a properly formatted message. * @throws IOException if there is a problem writing to the stream @@ -61,6 +62,7 @@ public interface I2CPMessage extends DataStructure { /** * Return the unique identifier for this type of APIMessage, as specified in the * network specification document under #ClientAccessLayerMessages + * @return unique identifier for this type of APIMessage */ public int getType(); } \ No newline at end of file diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageHandler.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageHandler.java index 608efebc370bb198591b00f72ae0c70e8108ee85..481d26f0e23a6c686e63713f819fa621d6f63cbf 100644 --- a/core/java/src/net/i2p/data/i2cp/I2CPMessageHandler.java +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageHandler.java @@ -27,6 +27,8 @@ public class I2CPMessageHandler { /** * Read an I2CPMessage from the stream and return the fully populated object. * + * @param in I2CP input stream + * @return Fully populated I2CPMessage * @throws IOException if there is an IO problem reading from the stream * @throws I2CPMessageException if there is a problem handling the particular * message - if it is an unknown type or has improper formatting, etc. diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java index 4462fdf5df2652ca2c5ba6d96ef74695e78ab25e..af86863d214be3ee3cba3afe9fe8b681e09d0874 100644 --- a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java @@ -32,6 +32,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 /> * + * @throws IOException */ public void readMessage(InputStream in) throws I2CPMessageException, IOException { int length = 0; @@ -53,6 +54,8 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM /** * Read the body into the data structures * + * @param length number of bytes in the message payload + * @throws IOException */ public void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException { if (type != getType()) @@ -77,6 +80,10 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM * Read in the payload part of the message (after the initial 4 byte size and 1 * byte type) * + * @param buf InputStream + * @param size payload size + * @throws I2CPMessageException + * @throws IOException */ protected abstract void doReadMessage(InputStream buf, int size) throws I2CPMessageException, IOException; @@ -84,6 +91,9 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM * Write out the payload part of the message (not including the 4 byte size and * 1 byte type) * + * @return byte array + * @throws I2CPMessageException + * @throws IOException */ protected abstract byte[] doWriteMessage() throws I2CPMessageException, IOException; @@ -91,6 +101,7 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM * Write out the full message to the stream, including the 4 byte size and 1 * byte type header. * + * @throws IOException */ public void writeMessage(OutputStream out) throws I2CPMessageException, IOException { byte[] data = doWriteMessage(); diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java index 21dbb5d0f64eb2fe475d3067a668a8dff405f32b..53650ec199fd6128f0c54c9aa9a420720f39b8eb 100644 --- a/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java @@ -91,21 +91,26 @@ public class I2CPMessageReader { * Notify the listener that a message has been received from the given * reader * - */ + * @param reader I2CPMessageReader to notify + * @param message the I2CPMessage + */ public void messageReceived(I2CPMessageReader reader, I2CPMessage message); /** * Notify the listener that an exception was thrown while reading from the given * reader * - */ + * @param reader I2CPMessageReader to notify + * @param error Exception that was thrown + */ public void readError(I2CPMessageReader reader, Exception error); /** * Notify the listener that the stream the given reader was running off * closed * - */ + * @param reader I2CPMessageReader to notify + */ public void disconnected(I2CPMessageReader reader); } diff --git a/core/java/src/net/i2p/data/i2cp/MessageId.java b/core/java/src/net/i2p/data/i2cp/MessageId.java index 350809d02e69587bec75cd4838da5eec74787d5d..d31d478f102aad390aad760ac61db75dec122b14 100644 --- a/core/java/src/net/i2p/data/i2cp/MessageId.java +++ b/core/java/src/net/i2p/data/i2cp/MessageId.java @@ -52,15 +52,18 @@ public class MessageId extends DataStructureImpl { DataHelper.writeLong(out, 4, _messageId); } + @Override public boolean equals(Object object) { if ((object == null) || !(object instanceof MessageId)) return false; return DataHelper.eq(getMessageId(), ((MessageId) object).getMessageId()); } + @Override public int hashCode() { return (int)getMessageId(); } + @Override public String toString() { return "[MessageId: " + getMessageId() + "]"; } diff --git a/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java b/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java index 1a8bddad9accff05db5a0b907ffa353fde4a62dd..acb602bfcf13b09409e609a3f50513852ed0dbea 100644 --- a/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java +++ b/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java @@ -80,7 +80,9 @@ public class MessagePayloadMessage extends I2CPMessageImpl { * Write out the full message to the stream, including the 4 byte size and 1 * byte type header. * + * @throws IOException */ + @Override public void writeMessage(OutputStream out) throws I2CPMessageException, IOException { if (_sessionId <= 0) throw new I2CPMessageException("Unable to write out the message, as the session ID has not been defined"); @@ -106,6 +108,7 @@ public class MessagePayloadMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof MessagePayloadMessage)) { MessagePayloadMessage msg = (MessagePayloadMessage) object; @@ -117,6 +120,7 @@ public class MessagePayloadMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[MessagePayloadMessage: "); @@ -126,4 +130,4 @@ public class MessagePayloadMessage extends I2CPMessageImpl { buf.append("]"); return buf.toString(); } -} \ No newline at end of file +} diff --git a/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java b/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java index 6c410cf339cd5827f25a466920a7d4ba7fdd9283..30c9cd22891ba94c53b511d0fe8e2d4aa6cf7ab8 100644 --- a/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java +++ b/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java @@ -121,7 +121,9 @@ public class MessageStatusMessage extends I2CPMessageImpl { /** * Override to reduce mem churn + * @throws IOException */ + @Override public void writeMessage(OutputStream out) throws I2CPMessageException, IOException { int len = 2 + // sessionId 4 + // messageId @@ -150,6 +152,7 @@ public class MessageStatusMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof MessageStatusMessage)) { MessageStatusMessage msg = (MessageStatusMessage) object; @@ -161,6 +164,7 @@ public class MessageStatusMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[MessageStatusMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java b/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java index f314ad213ae5c974c80ec404e1bb63f05280fac8..cdcf2e078cbdf83428a957facd67a55bc2a98393 100644 --- a/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java +++ b/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java @@ -66,7 +66,9 @@ public class ReceiveMessageBeginMessage extends I2CPMessageImpl { /** * Override to reduce mem churn + * @throws IOException */ + @Override public void writeMessage(OutputStream out) throws I2CPMessageException, IOException { int len = 2 + // sessionId 4; // messageId @@ -86,6 +88,7 @@ public class ReceiveMessageBeginMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof ReceiveMessageBeginMessage)) { ReceiveMessageBeginMessage msg = (ReceiveMessageBeginMessage) object; @@ -96,6 +99,7 @@ public class ReceiveMessageBeginMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[ReceiveMessageBeginMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java b/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java index bb43441a90e337b78a10e4e8a0eaec66b9b87141..c8a5be8ade7d108bfd3290ba8677272c163bd0aa 100644 --- a/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java +++ b/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java @@ -71,6 +71,7 @@ public class ReceiveMessageEndMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof ReceiveMessageEndMessage)) { ReceiveMessageEndMessage msg = (ReceiveMessageEndMessage) object; @@ -81,6 +82,7 @@ public class ReceiveMessageEndMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[ReceiveMessageEndMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java b/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java index c6a1b1c9b516f11bf6de79a21720edd686c7e802..10140649144b687cdb198365f6b6a22075f29217 100644 --- a/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java +++ b/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java @@ -108,6 +108,7 @@ public class ReportAbuseMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof ReportAbuseMessage)) { ReportAbuseMessage msg = (ReportAbuseMessage) object; @@ -118,6 +119,7 @@ public class ReportAbuseMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[ReportAbuseMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java b/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java index 521bdc836ca520e1e7ec4b60f91a6fa12d072c4e..20703a8945f4f8ab3cf30dbc122b8de2053ab524 100644 --- a/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java +++ b/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java @@ -124,6 +124,7 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof RequestLeaseSetMessage)) { RequestLeaseSetMessage msg = (RequestLeaseSetMessage) object; @@ -138,6 +139,7 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[RequestLeaseMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java b/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java index 9d8fe81c4a9414cbaaa0bb22129e562cb8592e35..f23569c0710dea0ebeac43ff4885f5d68596622c 100644 --- a/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java @@ -79,7 +79,9 @@ public class SendMessageMessage extends I2CPMessageImpl { /** * Read the body into the data structures * + * @throws IOException */ + @Override public void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException { if (type != getType()) throw new I2CPMessageException("Invalid message type (found: " + type + " supported: " + getType() @@ -107,7 +109,9 @@ public class SendMessageMessage extends I2CPMessageImpl { * Write out the full message to the stream, including the 4 byte size and 1 * byte type header. Override the parent so we can be more mem efficient * + * @throws IOException */ + @Override public void writeMessage(OutputStream out) throws I2CPMessageException, IOException { if ((_sessionId == null) || (_destination == null) || (_payload == null) || (_nonce <= 0)) throw new I2CPMessageException("Unable to write out the message as there is not enough data"); @@ -129,6 +133,7 @@ public class SendMessageMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof SendMessageMessage)) { SendMessageMessage msg = (SendMessageMessage) object; @@ -140,6 +145,7 @@ public class SendMessageMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[SendMessageMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/SessionConfig.java b/core/java/src/net/i2p/data/i2cp/SessionConfig.java index 3763bfc5ef9a9456b2c1e170c14453fa32ee9202..d16ffe126645c48bb3349140d7cc99e708b8e266 100644 --- a/core/java/src/net/i2p/data/i2cp/SessionConfig.java +++ b/core/java/src/net/i2p/data/i2cp/SessionConfig.java @@ -59,6 +59,7 @@ public class SessionConfig extends DataStructureImpl { /** * Retrieve the destination for which this session is supposed to connect * + * @return Destination for this session */ public Destination getDestination() { return _destination; @@ -68,6 +69,7 @@ public class SessionConfig extends DataStructureImpl { * Determine when this session was authorized by the destination (so we can * prevent replay attacks) * + * @return Date */ public Date getCreationDate() { return _creationDate; @@ -80,6 +82,7 @@ public class SessionConfig extends DataStructureImpl { /** * Retrieve any configuration options for the session * + * @return Properties of this session */ public Properties getOptions() { return _options; @@ -88,6 +91,7 @@ public class SessionConfig extends DataStructureImpl { /** * Configure the session with the given options * + * @param options Properties for this session */ public void setOptions(Properties options) { _options = options; @@ -104,6 +108,8 @@ public class SessionConfig extends DataStructureImpl { /** * Sign the structure using the supplied private key * + * @param signingKey SigningPrivateKey to sign with + * @throws DataFormatException */ public void signSessionConfig(SigningPrivateKey signingKey) throws DataFormatException { byte data[] = getBytes(); @@ -197,6 +203,7 @@ public class SessionConfig extends DataStructureImpl { _signature.writeBytes(out); } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof SessionConfig)) { SessionConfig cfg = (SessionConfig) object; @@ -209,6 +216,7 @@ public class SessionConfig extends DataStructureImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer("[SessionConfig: "); buf.append("\n\tDestination: ").append(getDestination()); diff --git a/core/java/src/net/i2p/data/i2cp/SessionId.java b/core/java/src/net/i2p/data/i2cp/SessionId.java index bd022494fe8183acb0430472de0bf755857ea172..d4c75ea5f878fd8de3e8423194df1251fc5a9769 100644 --- a/core/java/src/net/i2p/data/i2cp/SessionId.java +++ b/core/java/src/net/i2p/data/i2cp/SessionId.java @@ -49,15 +49,18 @@ public class SessionId extends DataStructureImpl { DataHelper.writeLong(out, 2, _sessionId); } + @Override public boolean equals(Object obj) { if ((obj == null) || !(obj instanceof SessionId)) return false; return getSessionId() == ((SessionId) obj).getSessionId(); } + @Override public int hashCode() { return getSessionId(); } + @Override public String toString() { return "[SessionId: " + getSessionId() + "]"; } diff --git a/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java b/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java index 67dd3672073984fbe675fc3fb2715d85e3567f87..673181d12837c048beb651b6caee18077f7f91d1 100644 --- a/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java @@ -82,6 +82,7 @@ public class SessionStatusMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof SessionStatusMessage)) { SessionStatusMessage msg = (SessionStatusMessage) object; @@ -91,6 +92,7 @@ public class SessionStatusMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[SessionStatusMessage: "); diff --git a/core/java/src/net/i2p/data/i2cp/SetDateMessage.java b/core/java/src/net/i2p/data/i2cp/SetDateMessage.java index 49247b02789612983a9145b78a57177ce8e9d408..f776642931c41079dbe366671cc692c5d2616003 100644 --- a/core/java/src/net/i2p/data/i2cp/SetDateMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SetDateMessage.java @@ -65,6 +65,7 @@ public class SetDateMessage extends I2CPMessageImpl { return MESSAGE_TYPE; } + @Override public boolean equals(Object object) { if ((object != null) && (object instanceof SetDateMessage)) { SetDateMessage msg = (SetDateMessage) object; @@ -74,6 +75,7 @@ public class SetDateMessage extends I2CPMessageImpl { return false; } + @Override public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[SetDateMessage");