2009-08-11 sponge

* Code Janitor time! Many fixes and documenting fixes that should be
      done in the future. for the most part, this is a general code cleanup.
    * On smaller/embedded systems, the "final" keyword cleanups will have
      more of an impact than on larger systems.
    * Document missing hashCode() methods.
    * Unhide more variables to make code easier to read.
This commit is contained in:
sponge
2009-08-11 21:58:56 +00:00
parent e5eea47b66
commit 3fbff71861
166 changed files with 2575 additions and 2417 deletions

View File

@ -29,7 +29,7 @@ class I2PSocketImpl implements I2PSocket {
private Destination remote;
private String localID;
private String remoteID;
private Object remoteIDWaiter = new Object();
private final Object remoteIDWaiter = new Object();
private I2PInputStream in;
private I2POutputStream out;
private I2PSocket.SocketErrorListener _socketErrorListener;
@ -42,7 +42,7 @@ class I2PSocketImpl implements I2PSocket {
private long _closedOn;
private long _remoteIdSetTime;
private I2PSocketOptions _options;
private Object flagLock = new Object();
private final Object flagLock = new Object();
/**
* Whether the I2P socket has already been closed.
@ -306,7 +306,7 @@ class I2PSocketImpl implements I2PSocket {
//--------------------------------------------------
private class I2PInputStream extends InputStream {
private String streamName;
private ByteCollector bc = new ByteCollector();
private final ByteCollector bc = new ByteCollector();
private boolean inStreamClosed = false;
private long readTimeout = -1;

View File

@ -13,7 +13,6 @@ import net.i2p.client.I2PClient;
import net.i2p.client.I2PClientFactory;
import net.i2p.client.I2PSession;
import net.i2p.client.I2PSessionException;
import net.i2p.data.Destination;
import net.i2p.util.Log;
/**

View File

@ -40,7 +40,7 @@ import net.i2p.util.Log;
class I2PSocketManagerImpl implements I2PSocketManager, I2PSessionListener {
private I2PAppContext _context;
private Log _log;
private /* final */ I2PSession _session;
private /* FIXME final FIXME */ I2PSession _session;
private I2PServerSocketImpl _serverSocket = null;
private final Object lock = new Object(); // for locking socket lists
private HashMap<String,I2PSocket> _outSockets;