mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-06-06 22:01:39 +00:00
findbugs
This commit is contained in:
@@ -355,10 +355,8 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
|
||||
_socket = new Socket(_hostname, _portNum);
|
||||
// _socket.setSoTimeout(1000000); // Uhmmm we could really-really use a real timeout, and handle it.
|
||||
_out = _socket.getOutputStream();
|
||||
synchronized (_out) {
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
}
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
_writer = new ClientWriterRunner(_out, this);
|
||||
InputStream in = _socket.getInputStream();
|
||||
_reader = new I2CPMessageReader(in, this);
|
||||
|
||||
@@ -78,10 +78,8 @@ class I2PSimpleSession extends I2PSessionImpl2 {
|
||||
else
|
||||
_socket = new Socket(_hostname, _portNum);
|
||||
_out = _socket.getOutputStream();
|
||||
synchronized (_out) {
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
}
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
_writer = new ClientWriterRunner(_out, this);
|
||||
InputStream in = _socket.getInputStream();
|
||||
_reader = new I2CPMessageReader(in, this);
|
||||
|
||||
@@ -432,6 +432,7 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
* @param source may be null
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
/****
|
||||
private void addEntry(SkipList sl, String key, Destination dest, String source) {
|
||||
Properties props = new Properties();
|
||||
props.setProperty(PROP_ADDED, Long.toString(_context.clock().now()));
|
||||
@@ -439,6 +440,7 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
props.setProperty(PROP_SOURCE, source);
|
||||
addEntry(sl, key, dest, props);
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Caller must synchronize
|
||||
@@ -476,9 +478,11 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
* @return null without exception on error (logs only)
|
||||
* @since 0.8.9
|
||||
*/
|
||||
/****
|
||||
private String getReverseEntry(Destination dest) {
|
||||
return getReverseEntry(dest.calculateHash());
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Caller must synchronize.
|
||||
|
||||
@@ -126,6 +126,7 @@ public class SingleFileNamingService extends NamingService {
|
||||
_log.warn("Error loading hosts file " + _file, ioe);
|
||||
return null;
|
||||
} finally {
|
||||
if (in != null) try { in.close(); } catch (IOException ioe) {}
|
||||
releaseReadLock();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user