diff --git a/core/java/src/net/i2p/client/ATalk.java b/core/java/src/net/i2p/client/ATalk.java index f93e9f09c..a517e995c 100644 --- a/core/java/src/net/i2p/client/ATalk.java +++ b/core/java/src/net/i2p/client/ATalk.java @@ -131,7 +131,6 @@ public class ATalk implements I2PSessionListener, Runnable { * application is complete. * */ - @Override public void run() { try { connect(); @@ -242,7 +241,6 @@ public class ATalk implements I2PSessionListener, Runnable { * message to the user. * */ - @Override public void messageAvailable(I2PSession session, int msgId, long size) { _log.debug("Message available: id = " + msgId + " size = " + size); try { @@ -353,19 +351,16 @@ public class ATalk implements I2PSessionListener, Runnable { } /** required by {@link I2PSessionListener I2PSessionListener} to notify of disconnect */ - @Override public void disconnected(I2PSession session) { _log.debug("Disconnected"); } /** required by {@link I2PSessionListener I2PSessionListener} to notify of error */ - @Override public void errorOccurred(I2PSession session, String message, Throwable error) { _log.debug("Error occurred: " + message, error); } /** required by {@link I2PSessionListener I2PSessionListener} to notify of abuse */ - @Override public void reportAbuse(I2PSession session, int severity) { _log.debug("Abuse reported of severity " + severity); } diff --git a/core/java/src/net/i2p/client/DisconnectMessageHandler.java b/core/java/src/net/i2p/client/DisconnectMessageHandler.java index 3234c401b..c7b58a19f 100644 --- a/core/java/src/net/i2p/client/DisconnectMessageHandler.java +++ b/core/java/src/net/i2p/client/DisconnectMessageHandler.java @@ -23,7 +23,6 @@ class DisconnectMessageHandler extends HandlerImpl { super(context, DisconnectMessage.MESSAGE_TYPE); } - @Override public void handleMessage(I2CPMessage message, I2PSessionImpl session) { _log.debug("Handle message " + message); session.destroySession(false); diff --git a/core/java/src/net/i2p/client/HandlerImpl.java b/core/java/src/net/i2p/client/HandlerImpl.java index 3009201ac..57380e44e 100644 --- a/core/java/src/net/i2p/client/HandlerImpl.java +++ b/core/java/src/net/i2p/client/HandlerImpl.java @@ -28,7 +28,6 @@ abstract class HandlerImpl implements I2CPMessageHandler { _log = new Log(getClass()); } - @Override public int getType() { return _type; } diff --git a/core/java/src/net/i2p/client/I2PClientImpl.java b/core/java/src/net/i2p/client/I2PClientImpl.java index 48325d573..4783458a3 100644 --- a/core/java/src/net/i2p/client/I2PClientImpl.java +++ b/core/java/src/net/i2p/client/I2PClientImpl.java @@ -33,7 +33,6 @@ class I2PClientImpl implements I2PClient { /** * Create the destination with a null payload */ - @Override public Destination createDestination(OutputStream destKeyStream) throws I2PException, IOException { Certificate cert = new Certificate(); cert.setCertificateType(Certificate.CERTIFICATE_TYPE_NULL); @@ -46,7 +45,6 @@ class I2PClientImpl implements I2PClient { * the PrivateKey and SigningPrivateKey to the destKeyStream * */ - @Override public Destination createDestination(OutputStream destKeyStream, Certificate cert) throws I2PException, IOException { Destination d = new Destination(); d.setCertificate(cert); @@ -71,7 +69,6 @@ class I2PClientImpl implements I2PClient { * Create a new session (though do not connect it yet) * */ - @Override public I2PSession createSession(InputStream destKeyStream, Properties options) throws I2PSessionException { return createSession(I2PAppContext.getGlobalContext(), destKeyStream, options); } diff --git a/core/java/src/net/i2p/client/I2PSessionImpl.java b/core/java/src/net/i2p/client/I2PSessionImpl.java index 984e3c739..69f6c99cc 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl.java @@ -231,7 +231,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * @throws I2PSessionException if there is a configuration error or the router is * not reachable */ - @Override public void connect() throws I2PSessionException { _closed = false; _availabilityNotifier.stopNotifying(); @@ -304,7 +303,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * notified the user that its available. * */ - @Override public byte[] receiveMessage(int msgId) throws I2PSessionException { int remaining = 0; MessagePayloadMessage msg = null; @@ -323,7 +321,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa /** * Report abuse with regards to the given messageId */ - @Override public void reportAbuse(int msgId, int severity) throws I2PSessionException { if (isClosed()) throw new I2PSessionException(getPrefix() + "Already closed"); _producer.reportAbuse(this, msgId, severity); @@ -335,10 +332,8 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * delivered successfully. make this wait for at least ACCEPTED * */ - @Override public abstract boolean sendMessage(Destination dest, byte[] payload) throws I2PSessionException; - @Override public abstract boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException; @@ -380,7 +375,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa private Long _msgId; public VerifyUsage(Long id) { _msgId = id; } - @Override public void timeReached() { MessagePayloadMessage removed = null; int remaining = 0; @@ -419,7 +413,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa AvailabilityNotifier.this.notifyAll(); } } - @Override public void run() { _alive = true; while (_alive) { @@ -461,7 +454,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * Recieve notification of some I2CP message and handle it if possible * */ - @Override public void messageReceived(I2CPMessageReader reader, I2CPMessage message) { I2CPMessageHandler handler = _handlerMap.getHandler(message.getType()); if (handler == null) { @@ -480,7 +472,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * Recieve notifiation of an error reading the I2CP stream * */ - @Override public void readError(I2CPMessageReader reader, Exception error) { propogateError("There was an error reading data", error); disconnect(); @@ -489,19 +480,16 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa /** * Retrieve the destination of the session */ - @Override public Destination getMyDestination() { return _myDestination; } /** * Retrieve the decryption PrivateKey */ - @Override public PrivateKey getDecryptionKey() { return _privateKey; } /** * Retrieve the signing SigningPrivateKey */ - @Override public SigningPrivateKey getPrivateKey() { return _signingPrivateKey; } /** @@ -521,11 +509,9 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa void setSessionId(SessionId id) { _sessionId = id; } /** configure the listener */ - @Override public void setSessionListener(I2PSessionListener lsnr) { _sessionListener = lsnr; } /** has the session been closed (or not yet connected)? */ - @Override public boolean isClosed() { return _closed; } /** @@ -575,7 +561,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa /** * Tear down the session, and do NOT reconnect */ - @Override public void destroySession() { destroySession(true); } @@ -623,7 +608,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa /** * Recieve notification that the I2CP connection was disconnected */ - @Override public void disconnected(I2CPMessageReader reader) { if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Disconnected", new Exception("Disconnected")); disconnect(); diff --git a/core/java/src/net/i2p/client/I2PSessionImpl2.java b/core/java/src/net/i2p/client/I2PSessionImpl2.java index c08b16fa3..3c06ad7e0 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl2.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl2.java @@ -80,7 +80,6 @@ class I2PSessionImpl2 extends I2PSessionImpl { public boolean sendMessage(Destination dest, byte[] payload) throws I2PSessionException { return sendMessage(dest, payload, 0, payload.length); } - @Override public boolean sendMessage(Destination dest, byte[] payload, int offset, int size) throws I2PSessionException { return sendMessage(dest, payload, offset, size, new SessionKey(), new HashSet(64)); } @@ -89,7 +88,6 @@ class I2PSessionImpl2 extends I2PSessionImpl { public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException { return sendMessage(dest, payload, 0, payload.length, keyUsed, tagsSent); } - @Override public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) throws I2PSessionException { if (_log.shouldLog(Log.DEBUG)) _log.debug("sending message"); diff --git a/core/java/src/net/i2p/client/MessagePayloadMessageHandler.java b/core/java/src/net/i2p/client/MessagePayloadMessageHandler.java index 309c83810..4b17a67d3 100644 --- a/core/java/src/net/i2p/client/MessagePayloadMessageHandler.java +++ b/core/java/src/net/i2p/client/MessagePayloadMessageHandler.java @@ -29,7 +29,6 @@ class MessagePayloadMessageHandler extends HandlerImpl { super(context, MessagePayloadMessage.MESSAGE_TYPE); } - @Override public void handleMessage(I2CPMessage message, I2PSessionImpl session) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Handle message " + message); diff --git a/core/java/src/net/i2p/client/MessageStatusMessageHandler.java b/core/java/src/net/i2p/client/MessageStatusMessageHandler.java index ef1adff36..1ee979ae4 100644 --- a/core/java/src/net/i2p/client/MessageStatusMessageHandler.java +++ b/core/java/src/net/i2p/client/MessageStatusMessageHandler.java @@ -26,7 +26,6 @@ class MessageStatusMessageHandler extends HandlerImpl { super(context, MessageStatusMessage.MESSAGE_TYPE); } - @Override public void handleMessage(I2CPMessage message, I2PSessionImpl session) { boolean skipStatus = true; if (_log.shouldLog(Log.DEBUG)) diff --git a/core/java/src/net/i2p/client/RequestLeaseSetMessageHandler.java b/core/java/src/net/i2p/client/RequestLeaseSetMessageHandler.java index 6cbce8161..7d6d816c1 100644 --- a/core/java/src/net/i2p/client/RequestLeaseSetMessageHandler.java +++ b/core/java/src/net/i2p/client/RequestLeaseSetMessageHandler.java @@ -40,7 +40,6 @@ class RequestLeaseSetMessageHandler extends HandlerImpl { _existingLeaseSets = new HashMap(32); } - @Override public void handleMessage(I2CPMessage message, I2PSessionImpl session) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Handle message " + message); diff --git a/core/java/src/net/i2p/client/SessionStatusMessageHandler.java b/core/java/src/net/i2p/client/SessionStatusMessageHandler.java index 65c329921..d6f875424 100644 --- a/core/java/src/net/i2p/client/SessionStatusMessageHandler.java +++ b/core/java/src/net/i2p/client/SessionStatusMessageHandler.java @@ -24,7 +24,6 @@ class SessionStatusMessageHandler extends HandlerImpl { super(context, SessionStatusMessage.MESSAGE_TYPE); } - @Override public void handleMessage(I2CPMessage message, I2PSessionImpl session) { _log.debug("Handle message " + message); SessionStatusMessage msg = (SessionStatusMessage) message; diff --git a/core/java/src/net/i2p/client/SetDateMessageHandler.java b/core/java/src/net/i2p/client/SetDateMessageHandler.java index 5783a8cfb..5e3dfab6b 100644 --- a/core/java/src/net/i2p/client/SetDateMessageHandler.java +++ b/core/java/src/net/i2p/client/SetDateMessageHandler.java @@ -24,7 +24,6 @@ class SetDateMessageHandler extends HandlerImpl { super(ctx, SetDateMessage.MESSAGE_TYPE); } - @Override public void handleMessage(I2CPMessage message, I2PSessionImpl session) { _log.debug("Handle message " + message); SetDateMessage msg = (SetDateMessage) message; diff --git a/core/java/src/net/i2p/data/Address.java b/core/java/src/net/i2p/data/Address.java index 347e60e71..205c448ff 100644 --- a/core/java/src/net/i2p/data/Address.java +++ b/core/java/src/net/i2p/data/Address.java @@ -42,7 +42,6 @@ public class Address extends DataStructureImpl { } } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _hostname = DataHelper.readString(in); @@ -50,7 +49,6 @@ public class Address extends DataStructureImpl { _destination.readBytes(in); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_hostname == null) || (_destination == null)) diff --git a/core/java/src/net/i2p/data/ByteArray.java b/core/java/src/net/i2p/data/ByteArray.java index 8b64547ce..1ececc305 100644 --- a/core/java/src/net/i2p/data/ByteArray.java +++ b/core/java/src/net/i2p/data/ByteArray.java @@ -74,7 +74,6 @@ public class ByteArray implements Serializable, Comparable { return (llen == rlen) && DataHelper.eq(lhs, loff, rhs, roff, llen); } - @Override public final int compareTo(Object obj) { if (obj.getClass() != getClass()) throw new ClassCastException("invalid object: " + obj); return DataHelper.compareTo(_data, ((ByteArray)obj).getData()); diff --git a/core/java/src/net/i2p/data/Certificate.java b/core/java/src/net/i2p/data/Certificate.java index 9ba259f7f..40a239053 100644 --- a/core/java/src/net/i2p/data/Certificate.java +++ b/core/java/src/net/i2p/data/Certificate.java @@ -67,7 +67,6 @@ public class Certificate extends DataStructureImpl { _payload = payload; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _type = (int) DataHelper.readLong(in, 1); int length = (int) DataHelper.readLong(in, 2); @@ -80,7 +79,6 @@ public class Certificate extends DataStructureImpl { } } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_type < 0) throw new DataFormatException("Invalid certificate type: " + _type); //if ((_type != 0) && (_payload == null)) throw new DataFormatException("Payload is required for non null type"); diff --git a/core/java/src/net/i2p/data/DataStructureImpl.java b/core/java/src/net/i2p/data/DataStructureImpl.java index 9d8f0d4dc..b4b43eb57 100644 --- a/core/java/src/net/i2p/data/DataStructureImpl.java +++ b/core/java/src/net/i2p/data/DataStructureImpl.java @@ -25,7 +25,6 @@ import net.i2p.util.Log; public abstract class DataStructureImpl implements DataStructure { private final static Log _log = new Log(DataStructureImpl.class); - @Override public String toBase64() { byte data[] = toByteArray(); if (data == null) @@ -33,19 +32,16 @@ public abstract class DataStructureImpl implements DataStructure { return Base64.encode(data); } - @Override public void fromBase64(String data) throws DataFormatException { if (data == null) throw new DataFormatException("Null data passed in"); byte bytes[] = Base64.decode(data); fromByteArray(bytes); } - @Override public Hash calculateHash() { byte data[] = toByteArray(); if (data != null) return SHA256Generator.getInstance().calculateHash(data); return null; } - @Override public byte[] toByteArray() { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(512); @@ -59,7 +55,6 @@ public abstract class DataStructureImpl implements DataStructure { return null; } } - @Override public void fromByteArray(byte data[]) throws DataFormatException { if (data == null) throw new DataFormatException("Null data passed in"); try { diff --git a/core/java/src/net/i2p/data/Destination.java b/core/java/src/net/i2p/data/Destination.java index 7a3442896..791dc1209 100644 --- a/core/java/src/net/i2p/data/Destination.java +++ b/core/java/src/net/i2p/data/Destination.java @@ -72,7 +72,6 @@ public class Destination extends DataStructureImpl { __calculatedHash = null; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _publicKey = new PublicKey(); _publicKey.readBytes(in); @@ -83,7 +82,6 @@ public class Destination extends DataStructureImpl { __calculatedHash = null; } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_certificate == null) || (_publicKey == null) || (_signingKey == null)) throw new DataFormatException("Not enough data to format the destination"); diff --git a/core/java/src/net/i2p/data/Hash.java b/core/java/src/net/i2p/data/Hash.java index 54c6f192a..e986b2b5d 100644 --- a/core/java/src/net/i2p/data/Hash.java +++ b/core/java/src/net/i2p/data/Hash.java @@ -127,7 +127,6 @@ public class Hash extends DataStructureImpl { _xorCache = null; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[HASH_LENGTH]; _stringified = null; @@ -136,7 +135,6 @@ public class Hash extends DataStructureImpl { if (read != HASH_LENGTH) throw new DataFormatException("Not enough bytes to read the hash"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the hash to write out"); if (_data.length != HASH_LENGTH) throw new DataFormatException("Invalid size of data in the private key"); diff --git a/core/java/src/net/i2p/data/Lease.java b/core/java/src/net/i2p/data/Lease.java index c51e12112..5f7b3159e 100644 --- a/core/java/src/net/i2p/data/Lease.java +++ b/core/java/src/net/i2p/data/Lease.java @@ -112,7 +112,6 @@ public class Lease extends DataStructureImpl { return _end.getTime() < Clock.getInstance().now() - fudgeFactor; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _gateway = new Hash(); _gateway.readBytes(in); @@ -121,7 +120,6 @@ public class Lease extends DataStructureImpl { _end = DataHelper.readDate(in); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_gateway == null) || (_tunnelId == null)) throw new DataFormatException("Not enough data to write out a Lease"); diff --git a/core/java/src/net/i2p/data/LeaseSet.java b/core/java/src/net/i2p/data/LeaseSet.java index 3dd964752..7dd74a9d7 100644 --- a/core/java/src/net/i2p/data/LeaseSet.java +++ b/core/java/src/net/i2p/data/LeaseSet.java @@ -253,7 +253,6 @@ public class LeaseSet extends DataStructureImpl { return rv; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _destination = new Destination(); _destination.readBytes(in); @@ -275,7 +274,6 @@ public class LeaseSet extends DataStructureImpl { _signature.readBytes(in); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_destination == null) || (_encryptionKey == null) || (_signingKey == null) || (_leases == null) || (_signature == null)) throw new DataFormatException("Not enough data to write out a LeaseSet"); diff --git a/core/java/src/net/i2p/data/Payload.java b/core/java/src/net/i2p/data/Payload.java index 5df842383..2c730a236 100644 --- a/core/java/src/net/i2p/data/Payload.java +++ b/core/java/src/net/i2p/data/Payload.java @@ -67,7 +67,6 @@ public class Payload extends DataStructureImpl { return 0; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { int size = (int) DataHelper.readLong(in, 4); if (size < 0) throw new DataFormatException("payload size out of range (" + size + ")"); @@ -78,7 +77,6 @@ public class Payload extends DataStructureImpl { _log.debug("read payload: " + read + " bytes"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_encryptedData == null) throw new DataFormatException("Not yet encrypted. Please set the encrypted data"); DataHelper.writeLong(out, 4, _encryptedData.length); diff --git a/core/java/src/net/i2p/data/PrivateKey.java b/core/java/src/net/i2p/data/PrivateKey.java index ca1b95ce2..e6c06dfd2 100644 --- a/core/java/src/net/i2p/data/PrivateKey.java +++ b/core/java/src/net/i2p/data/PrivateKey.java @@ -51,14 +51,12 @@ public class PrivateKey extends DataStructureImpl { _data = data; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[KEYSIZE_BYTES]; int read = read(in, _data); if (read != KEYSIZE_BYTES) throw new DataFormatException("Not enough bytes to read the private key"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the private key to write out"); if (_data.length != KEYSIZE_BYTES) diff --git a/core/java/src/net/i2p/data/PublicKey.java b/core/java/src/net/i2p/data/PublicKey.java index f2a9a8a5c..aaf25b04a 100644 --- a/core/java/src/net/i2p/data/PublicKey.java +++ b/core/java/src/net/i2p/data/PublicKey.java @@ -54,14 +54,12 @@ public class PublicKey extends DataStructureImpl { _data = data; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[KEYSIZE_BYTES]; int read = read(in, _data); if (read != KEYSIZE_BYTES) throw new DataFormatException("Not enough bytes to read the public key"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the public key to write out"); if (_data.length != KEYSIZE_BYTES) throw new DataFormatException("Invalid size of data in the public key"); diff --git a/core/java/src/net/i2p/data/RouterAddress.java b/core/java/src/net/i2p/data/RouterAddress.java index 277aa0c29..f87e2b4ce 100644 --- a/core/java/src/net/i2p/data/RouterAddress.java +++ b/core/java/src/net/i2p/data/RouterAddress.java @@ -105,7 +105,6 @@ public class RouterAddress extends DataStructureImpl { _options = options; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _cost = (int) DataHelper.readLong(in, 1); _expiration = DataHelper.readDate(in); @@ -113,7 +112,6 @@ public class RouterAddress extends DataStructureImpl { _options = DataHelper.readProperties(in); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_cost < 0) || (_transportStyle == null) || (_options == null)) throw new DataFormatException("Not enough data to write a router address"); diff --git a/core/java/src/net/i2p/data/RouterIdentity.java b/core/java/src/net/i2p/data/RouterIdentity.java index a004e7f76..c1ad540ef 100644 --- a/core/java/src/net/i2p/data/RouterIdentity.java +++ b/core/java/src/net/i2p/data/RouterIdentity.java @@ -74,7 +74,6 @@ public class RouterIdentity extends DataStructureImpl { return (_certificate != null) && (_certificate.getCertificateType() == Certificate.CERTIFICATE_TYPE_HIDDEN); } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _publicKey = new PublicKey(); _publicKey.readBytes(in); @@ -85,7 +84,6 @@ public class RouterIdentity extends DataStructureImpl { __calculatedHash = null; } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_certificate == null) || (_publicKey == null) || (_signingKey == null)) throw new DataFormatException("Not enough data to format the router identity"); diff --git a/core/java/src/net/i2p/data/RouterInfo.java b/core/java/src/net/i2p/data/RouterInfo.java index 028cb9aa1..191c72019 100644 --- a/core/java/src/net/i2p/data/RouterInfo.java +++ b/core/java/src/net/i2p/data/RouterInfo.java @@ -487,7 +487,6 @@ public class RouterInfo extends DataStructureImpl { } } - @Override public synchronized void readBytes(InputStream in) throws DataFormatException, IOException { _identity = new RouterIdentity(); _identity.readBytes(in); @@ -517,7 +516,6 @@ public class RouterInfo extends DataStructureImpl { //_log.debug("Read routerInfo: " + toString()); } - @Override public synchronized void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_identity == null) throw new DataFormatException("Missing identity"); if (_published < 0) throw new DataFormatException("Invalid published date: " + _published); diff --git a/core/java/src/net/i2p/data/SessionKey.java b/core/java/src/net/i2p/data/SessionKey.java index 25059217a..a59632592 100644 --- a/core/java/src/net/i2p/data/SessionKey.java +++ b/core/java/src/net/i2p/data/SessionKey.java @@ -58,14 +58,12 @@ public class SessionKey extends DataStructureImpl { public Object getPreparedKey() { return _preparedKey; } public void setPreparedKey(Object obj) { _preparedKey = obj; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[KEYSIZE_BYTES]; int read = read(in, _data); if (read != KEYSIZE_BYTES) throw new DataFormatException("Not enough bytes to read the session key"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the session key to write out"); if (_data.length != KEYSIZE_BYTES) throw new DataFormatException("Invalid size of data in the private key"); diff --git a/core/java/src/net/i2p/data/Signature.java b/core/java/src/net/i2p/data/Signature.java index f86f8c226..4ab11b947 100644 --- a/core/java/src/net/i2p/data/Signature.java +++ b/core/java/src/net/i2p/data/Signature.java @@ -44,14 +44,12 @@ public class Signature extends DataStructureImpl { _data = data; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[SIGNATURE_BYTES]; int read = read(in, _data); if (read != SIGNATURE_BYTES) throw new DataFormatException("Not enough bytes to read the signature"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the signature to write out"); if (_data.length != SIGNATURE_BYTES) throw new DataFormatException("Invalid size of data in the private key"); diff --git a/core/java/src/net/i2p/data/SigningPrivateKey.java b/core/java/src/net/i2p/data/SigningPrivateKey.java index 8a684fabe..5f4d64ec0 100644 --- a/core/java/src/net/i2p/data/SigningPrivateKey.java +++ b/core/java/src/net/i2p/data/SigningPrivateKey.java @@ -50,14 +50,12 @@ public class SigningPrivateKey extends DataStructureImpl { _data = data; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[KEYSIZE_BYTES]; int read = read(in, _data); if (read != KEYSIZE_BYTES) throw new DataFormatException("Not enough bytes to read the private key"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the private key to write out"); if (_data.length != KEYSIZE_BYTES) throw new DataFormatException("Invalid size of data in the private key"); diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java index e4d43f763..148fc242e 100644 --- a/core/java/src/net/i2p/data/SigningPublicKey.java +++ b/core/java/src/net/i2p/data/SigningPublicKey.java @@ -49,14 +49,12 @@ public class SigningPublicKey extends DataStructureImpl { _data = data; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _data = new byte[KEYSIZE_BYTES]; int read = read(in, _data); if (read != KEYSIZE_BYTES) throw new DataFormatException("Not enough bytes to read the public key"); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_data == null) throw new DataFormatException("No data in the public key to write out"); if (_data.length != KEYSIZE_BYTES) throw new DataFormatException("Invalid size of data in the public key"); diff --git a/core/java/src/net/i2p/data/TunnelId.java b/core/java/src/net/i2p/data/TunnelId.java index d70369a50..e9ed13cff 100644 --- a/core/java/src/net/i2p/data/TunnelId.java +++ b/core/java/src/net/i2p/data/TunnelId.java @@ -68,12 +68,10 @@ public class TunnelId extends DataStructureImpl { public int getType() { return _type; } public void setType(int type) { _type = type; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _tunnelId = DataHelper.readLong(in, 4); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_tunnelId < 0) throw new DataFormatException("Invalid tunnel ID: " + _tunnelId); DataHelper.writeLong(out, 4, _tunnelId); diff --git a/core/java/src/net/i2p/data/i2cp/AbuseReason.java b/core/java/src/net/i2p/data/i2cp/AbuseReason.java index 3e2632736..db69fedd9 100644 --- a/core/java/src/net/i2p/data/i2cp/AbuseReason.java +++ b/core/java/src/net/i2p/data/i2cp/AbuseReason.java @@ -40,12 +40,10 @@ public class AbuseReason extends DataStructureImpl { _reason = reason; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _reason = DataHelper.readString(in); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_reason == null) throw new DataFormatException("Invalid abuse reason"); DataHelper.writeString(out, _reason); diff --git a/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java b/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java index 6e392a2bd..2f9140e08 100644 --- a/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java +++ b/core/java/src/net/i2p/data/i2cp/AbuseSeverity.java @@ -41,12 +41,10 @@ public class AbuseSeverity extends DataStructureImpl { _severityId = id; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _severityId = (int) DataHelper.readLong(in, 1); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_severityId < 0) throw new DataFormatException("Invalid abuse severity: " + _severityId); DataHelper.writeLong(out, 1, _severityId); diff --git a/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java b/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java index e6bdfaff8..f31aaa3aa 100644 --- a/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java +++ b/core/java/src/net/i2p/data/i2cp/CreateLeaseSetMessage.java @@ -109,7 +109,6 @@ public class CreateLeaseSetMessage extends I2CPMessageImpl { return os.toByteArray(); } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java b/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java index 04b5f5840..fa47ce57f 100644 --- a/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java +++ b/core/java/src/net/i2p/data/i2cp/CreateSessionMessage.java @@ -68,7 +68,6 @@ public class CreateSessionMessage extends I2CPMessageImpl { return os.toByteArray(); } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java b/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java index 07e61384a..3ccd5263a 100644 --- a/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java +++ b/core/java/src/net/i2p/data/i2cp/DisconnectMessage.java @@ -60,7 +60,6 @@ public class DisconnectMessage extends I2CPMessageImpl { return os.toByteArray(); } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/GetDateMessage.java b/core/java/src/net/i2p/data/i2cp/GetDateMessage.java index 92c602628..003ab534d 100644 --- a/core/java/src/net/i2p/data/i2cp/GetDateMessage.java +++ b/core/java/src/net/i2p/data/i2cp/GetDateMessage.java @@ -37,7 +37,6 @@ public class GetDateMessage extends I2CPMessageImpl { return rv; } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java index cb0ee9dda..af86863d2 100644 --- a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java @@ -34,7 +34,6 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM * * @throws IOException */ - @Override public void readMessage(InputStream in) throws I2CPMessageException, IOException { int length = 0; try { @@ -58,7 +57,6 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM * @param length number of bytes in the message payload * @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() @@ -105,7 +103,6 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM * * @throws IOException */ - @Override public void writeMessage(OutputStream out) throws I2CPMessageException, IOException { byte[] data = doWriteMessage(); try { @@ -117,7 +114,6 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM out.write(data); } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { try { readMessage(in); @@ -126,7 +122,6 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM } } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { try { writeMessage(out); diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java index 2414b0da9..53650ec19 100644 --- a/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageReader.java @@ -144,7 +144,6 @@ public class I2CPMessageReader { _stream = null; } - @Override public void run() { while (_stayAlive) { while (_doRun) { diff --git a/core/java/src/net/i2p/data/i2cp/MessageId.java b/core/java/src/net/i2p/data/i2cp/MessageId.java index 76da41cdb..d31d478f1 100644 --- a/core/java/src/net/i2p/data/i2cp/MessageId.java +++ b/core/java/src/net/i2p/data/i2cp/MessageId.java @@ -43,12 +43,10 @@ public class MessageId extends DataStructureImpl { _messageId = id; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _messageId = DataHelper.readLong(in, 4); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_messageId < 0) throw new DataFormatException("Invalid message ID: " + _messageId); DataHelper.writeLong(out, 4, _messageId); diff --git a/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java b/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java index 348c05e02..1e77f3636 100644 --- a/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java +++ b/core/java/src/net/i2p/data/i2cp/MessagePayloadMessage.java @@ -106,7 +106,6 @@ public class MessagePayloadMessage extends I2CPMessageImpl { } } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java b/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java index 5cebb092f..998069041 100644 --- a/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java +++ b/core/java/src/net/i2p/data/i2cp/MessageStatusMessage.java @@ -150,7 +150,6 @@ public class MessageStatusMessage extends I2CPMessageImpl { throw new UnsupportedOperationException("This shouldn't be called... use writeMessage(out)"); } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java b/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java index f831687e2..29320c82a 100644 --- a/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java +++ b/core/java/src/net/i2p/data/i2cp/ReceiveMessageBeginMessage.java @@ -85,7 +85,6 @@ public class ReceiveMessageBeginMessage extends I2CPMessageImpl { } } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java b/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java index 385e93a97..dcdae6e14 100644 --- a/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java +++ b/core/java/src/net/i2p/data/i2cp/ReceiveMessageEndMessage.java @@ -69,7 +69,6 @@ public class ReceiveMessageEndMessage extends I2CPMessageImpl { return rv; } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java b/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java index 9a9b012d2..0800359f2 100644 --- a/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java +++ b/core/java/src/net/i2p/data/i2cp/ReportAbuseMessage.java @@ -106,7 +106,6 @@ public class ReportAbuseMessage extends I2CPMessageImpl { return os.toByteArray(); } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java b/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java index d095f4fac..2cd630db6 100644 --- a/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java +++ b/core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java @@ -122,7 +122,6 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl { return os.toByteArray(); } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java b/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java index c3a21a122..2b9973c0e 100644 --- a/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java @@ -131,7 +131,6 @@ public class SendMessageMessage extends I2CPMessageImpl { } } - @Override public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/SessionConfig.java b/core/java/src/net/i2p/data/i2cp/SessionConfig.java index 8a41f3428..d16ffe126 100644 --- a/core/java/src/net/i2p/data/i2cp/SessionConfig.java +++ b/core/java/src/net/i2p/data/i2cp/SessionConfig.java @@ -185,7 +185,6 @@ public class SessionConfig extends DataStructureImpl { return out.toByteArray(); } - @Override public void readBytes(InputStream rawConfig) throws DataFormatException, IOException { _destination = new Destination(); _destination.readBytes(rawConfig); @@ -195,7 +194,6 @@ public class SessionConfig extends DataStructureImpl { _signature.readBytes(rawConfig); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if ((_destination == null) || (_options == null) || (_signature == null) || (_creationDate == null)) throw new DataFormatException("Not enough data to create the session config"); diff --git a/core/java/src/net/i2p/data/i2cp/SessionId.java b/core/java/src/net/i2p/data/i2cp/SessionId.java index d099852a5..d4c75ea5f 100644 --- a/core/java/src/net/i2p/data/i2cp/SessionId.java +++ b/core/java/src/net/i2p/data/i2cp/SessionId.java @@ -40,12 +40,10 @@ public class SessionId extends DataStructureImpl { _sessionId = id; } - @Override public void readBytes(InputStream in) throws DataFormatException, IOException { _sessionId = (int) DataHelper.readLong(in, 2); } - @Override public void writeBytes(OutputStream out) throws DataFormatException, IOException { if (_sessionId < 0) throw new DataFormatException("Invalid session ID: " + _sessionId); DataHelper.writeLong(out, 2, _sessionId); diff --git a/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java b/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java index 1a060b523..cf989c908 100644 --- a/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SessionStatusMessage.java @@ -79,8 +79,7 @@ public class SessionStatusMessage extends I2CPMessageImpl { } return os.toByteArray(); } - - @Override + public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/data/i2cp/SetDateMessage.java b/core/java/src/net/i2p/data/i2cp/SetDateMessage.java index b441dee56..605b0a928 100644 --- a/core/java/src/net/i2p/data/i2cp/SetDateMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SetDateMessage.java @@ -62,8 +62,7 @@ public class SetDateMessage extends I2CPMessageImpl { } return os.toByteArray(); } - - @Override + public int getType() { return MESSAGE_TYPE; } diff --git a/core/java/src/net/i2p/stat/BufferedStatLog.java b/core/java/src/net/i2p/stat/BufferedStatLog.java index 5ad1024a4..7fed2d090 100644 --- a/core/java/src/net/i2p/stat/BufferedStatLog.java +++ b/core/java/src/net/i2p/stat/BufferedStatLog.java @@ -51,7 +51,6 @@ public class BufferedStatLog implements StatLog { writer.start(); } - @Override public void addData(String scope, String stat, long value, long duration) { if (DISABLE_LOGGING) return; if (!shouldLog(stat)) return; @@ -123,7 +122,6 @@ public class BufferedStatLog implements StatLog { private class StatLogWriter implements Runnable { private SimpleDateFormat _fmt = new SimpleDateFormat("yyyyMMdd HH:mm:ss.SSS"); - @Override public void run() { int writeStart = -1; int writeEnd = -1; diff --git a/core/java/src/net/i2p/time/Timestamper.java b/core/java/src/net/i2p/time/Timestamper.java index 35c5c01e8..6758ab466 100644 --- a/core/java/src/net/i2p/time/Timestamper.java +++ b/core/java/src/net/i2p/time/Timestamper.java @@ -110,7 +110,6 @@ public class Timestamper implements Runnable { } catch (InterruptedException ie) {} } - @Override public void run() { try { Thread.sleep(1000); } catch (InterruptedException ie) {} _log = _context.logManager().getLog(Timestamper.class); diff --git a/core/java/src/net/i2p/util/ByteCache.java b/core/java/src/net/i2p/util/ByteCache.java index c8b4d51a3..aadc721aa 100644 --- a/core/java/src/net/i2p/util/ByteCache.java +++ b/core/java/src/net/i2p/util/ByteCache.java @@ -108,7 +108,6 @@ public final class ByteCache { } private class Cleanup implements SimpleTimer.TimedEvent { - @Override public void timeReached() { if (System.currentTimeMillis() - _lastOverflow > EXPIRE_PERIOD) { // we haven't exceeded the cache size in a few minutes, so lets diff --git a/core/java/src/net/i2p/util/Clock.java b/core/java/src/net/i2p/util/Clock.java index ba0daa786..66d20721c 100644 --- a/core/java/src/net/i2p/util/Clock.java +++ b/core/java/src/net/i2p/util/Clock.java @@ -110,7 +110,7 @@ public class Clock implements Timestamper.UpdateListener { public boolean getUpdatedSuccessfully() { return _alreadyChanged; } - @Override + public void setNow(long realTime) { long diff = realTime - System.currentTimeMillis(); setOffset(diff); diff --git a/core/java/src/net/i2p/util/DecayingBloomFilter.java b/core/java/src/net/i2p/util/DecayingBloomFilter.java index 0d9275b5c..164c8e453 100644 --- a/core/java/src/net/i2p/util/DecayingBloomFilter.java +++ b/core/java/src/net/i2p/util/DecayingBloomFilter.java @@ -206,7 +206,6 @@ public class DecayingBloomFilter { } private class DecayEvent implements SimpleTimer.TimedEvent { - @Override public void timeReached() { if (_keepDecaying) { decay(); diff --git a/core/java/src/net/i2p/util/EepGet.java b/core/java/src/net/i2p/util/EepGet.java index bf8acbea3..468fefa79 100644 --- a/core/java/src/net/i2p/util/EepGet.java +++ b/core/java/src/net/i2p/util/EepGet.java @@ -262,7 +262,6 @@ public class EepGet { _startedOn = _lastComplete; _firstTime = true; } - @Override public void bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, String url) { if (_firstTime) { if (alreadyTransferred > 0) { @@ -319,7 +318,6 @@ public class EepGet { } } } - @Override public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile, boolean notModified) { long transferred; if (_firstTime) @@ -358,7 +356,6 @@ public class EepGet { System.out.println(buf.toString()); } } - @Override public void attemptFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt, int numRetries, Exception cause) { System.out.println(); System.out.println("** " + new Date()); @@ -369,7 +366,6 @@ public class EepGet { _previousWritten += _written; _written = 0; } - @Override public void transferFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt) { System.out.println("== " + new Date()); System.out.println("== Transfer of " + url + " failed after " + currentAttempt + " attempts"); @@ -386,9 +382,7 @@ public class EepGet { buf.append("KBps"); System.out.println(buf.toString()); } - @Override public void attempting(String url) {} - @Override public void headerReceived(String url, int currentAttempt, String key, String val) {} } @@ -424,7 +418,6 @@ public class EepGet { timeout = new SocketTimeout(_fetchHeaderTimeout); final SocketTimeout stimeout = timeout; // ugly timeout.setTimeoutCommand(new Runnable() { - @Override public void run() { if (_log.shouldLog(Log.DEBUG)) _log.debug("timeout reached on " + _url + ": " + stimeout); diff --git a/core/java/src/net/i2p/util/EepGetScheduler.java b/core/java/src/net/i2p/util/EepGetScheduler.java index 2b2867783..86db28540 100644 --- a/core/java/src/net/i2p/util/EepGetScheduler.java +++ b/core/java/src/net/i2p/util/EepGetScheduler.java @@ -30,7 +30,6 @@ public class EepGetScheduler implements EepGet.StatusListener { public void fetch() { I2PThread t = new I2PThread(new Runnable() { - @Override public void run() { fetchNext(); } @@ -67,30 +66,24 @@ public class EepGetScheduler implements EepGet.StatusListener { get.fetch(); } - @Override public void attemptFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt, int numRetries, Exception cause) { _listener.attemptFailed(url, bytesTransferred, bytesRemaining, currentAttempt, numRetries, cause); } - @Override public void bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, String url) { _listener.bytesTransferred(alreadyTransferred, currentWrite, bytesTransferred, bytesRemaining, url); } - @Override public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile, boolean notModified) { _listener.transferComplete(alreadyTransferred, bytesTransferred, bytesRemaining, url, outputFile, notModified); fetchNext(); } - @Override public void transferFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt) { _listener.transferFailed(url, bytesTransferred, bytesRemaining, currentAttempt); fetchNext(); } - @Override public void attempting(String url) { _listener.attempting(url); } - @Override public void headerReceived(String url, int attemptNum, String key, String val) {} } diff --git a/core/java/src/net/i2p/util/EepPost.java b/core/java/src/net/i2p/util/EepPost.java index a72e97924..50929f3cf 100644 --- a/core/java/src/net/i2p/util/EepPost.java +++ b/core/java/src/net/i2p/util/EepPost.java @@ -73,7 +73,6 @@ public class EepPost { _fields = fields; _onCompletion = onCompletion; } - @Override public void run() { if (_log.shouldLog(Log.DEBUG)) _log.debug("Running the post task"); Socket s = null; diff --git a/core/java/src/net/i2p/util/EventDispatcherImpl.java b/core/java/src/net/i2p/util/EventDispatcherImpl.java index 9a82d6a1d..1a67eef99 100644 --- a/core/java/src/net/i2p/util/EventDispatcherImpl.java +++ b/core/java/src/net/i2p/util/EventDispatcherImpl.java @@ -38,12 +38,10 @@ public class EventDispatcherImpl implements EventDispatcher { private HashMap _events = new HashMap(4); private ArrayList _attached = new ArrayList(); - @Override public EventDispatcher getEventDispatcher() { return this; } - @Override public void attachEventDispatcher(EventDispatcher ev) { if (ev == null) return; synchronized (_attached) { @@ -52,7 +50,6 @@ public class EventDispatcherImpl implements EventDispatcher { } } - @Override public void detachEventDispatcher(EventDispatcher ev) { if (ev == null) return; synchronized (_attached) { @@ -66,7 +63,6 @@ public class EventDispatcherImpl implements EventDispatcher { } } - @Override public void notifyEvent(String eventName, Object args) { if (_ignore) return; if (args == null) { @@ -89,7 +85,6 @@ public class EventDispatcherImpl implements EventDispatcher { } } - @Override public Object getEventValue(String name) { if (_ignore) return null; Object val; @@ -112,7 +107,6 @@ public class EventDispatcherImpl implements EventDispatcher { return set; } - @Override public void ignoreEvents() { _ignore = true; synchronized (_events) { @@ -121,12 +115,10 @@ public class EventDispatcherImpl implements EventDispatcher { _events = null; } - @Override public void unIgnoreEvents() { _ignore = false; } - @Override public Object waitEventValue(String name) { if (_ignore) return null; Object val; diff --git a/core/java/src/net/i2p/util/Executor.java b/core/java/src/net/i2p/util/Executor.java index 1b8fa17bb..fb8757f4f 100644 --- a/core/java/src/net/i2p/util/Executor.java +++ b/core/java/src/net/i2p/util/Executor.java @@ -16,7 +16,6 @@ class Executor implements Runnable { runn = x; } - @Override public void run() { while(runn.getAnswer()) { SimpleTimer.TimedEvent evt = null; diff --git a/core/java/src/net/i2p/util/I2PThread.java b/core/java/src/net/i2p/util/I2PThread.java index ac7208c10..3756eda9e 100644 --- a/core/java/src/net/i2p/util/I2PThread.java +++ b/core/java/src/net/i2p/util/I2PThread.java @@ -111,7 +111,6 @@ public class I2PThread extends Thread { public static void main(String args[]) { I2PThread t = new I2PThread(new Runnable() { - @Override public void run() { throw new NullPointerException("blah"); } diff --git a/core/java/src/net/i2p/util/LogWriter.java b/core/java/src/net/i2p/util/LogWriter.java index a2612d1c4..29fcff7cc 100644 --- a/core/java/src/net/i2p/util/LogWriter.java +++ b/core/java/src/net/i2p/util/LogWriter.java @@ -44,7 +44,6 @@ class LogWriter implements Runnable { _write = false; } - @Override public void run() { _write = true; try { diff --git a/core/java/src/net/i2p/util/OrderedProperties.java b/core/java/src/net/i2p/util/OrderedProperties.java index 88528e8bf..65d8f049a 100644 --- a/core/java/src/net/i2p/util/OrderedProperties.java +++ b/core/java/src/net/i2p/util/OrderedProperties.java @@ -248,24 +248,20 @@ public class OrderedProperties extends Properties { _value = val; } - @Override public Object getKey() { return _key; } - @Override public Object getValue() { return _value; } - @Override public Object setValue(Object value) { Object old = _value; _value = value; return old; } - @Override public int compareTo(Object o) { if (o == null) return -1; if (o instanceof StringMapEntry) return ((String) getKey()).compareTo((String)((StringMapEntry) o).getKey()); @@ -359,7 +355,6 @@ public class OrderedProperties extends Properties { _props = props; } - @Override public void run() { int numRuns = 1000; _log.debug("Begin thrashing " + numRuns + " times"); diff --git a/core/java/src/net/i2p/util/RandomSource.java b/core/java/src/net/i2p/util/RandomSource.java index 81a5baef4..550b37b8d 100644 --- a/core/java/src/net/i2p/util/RandomSource.java +++ b/core/java/src/net/i2p/util/RandomSource.java @@ -114,13 +114,11 @@ public class RandomSource extends SecureRandom implements EntropyHarvester { public EntropyHarvester harvester() { return _entropyHarvester; } - @Override public void feedEntropy(String source, long data, int bitoffset, int bits) { if (bitoffset == 0) setSeed(data); } - @Override public void feedEntropy(String source, byte[] data, int offset, int len) { if ( (offset == 0) && (len == data.length) ) { setSeed(data);