Big findbugs cleanup

This commit is contained in:
zzz
2008-10-19 22:09:14 +00:00
parent 8a756a6e81
commit 20effe3a7f
77 changed files with 261 additions and 245 deletions

View File

@ -384,7 +384,7 @@ class I2PSocketImpl implements I2PSocket {
}
}
if (read.length > len) throw new RuntimeException("BUG");
if ( (inStreamClosed) && ( (read == null) || (read.length <= 0) ) )
if ( (inStreamClosed) && (read.length <= 0) )
return -1;
System.arraycopy(read, 0, b, off, read.length);

View File

@ -75,7 +75,7 @@ public class I2PSocketManagerFactory {
I2PClient client = I2PClientFactory.createClient();
ByteArrayOutputStream keyStream = new ByteArrayOutputStream(512);
try {
Destination dest = client.createDestination(keyStream);
client.createDestination(keyStream);
ByteArrayInputStream in = new ByteArrayInputStream(keyStream.toByteArray());
return createManager(in, i2cpHost, i2cpPort, opts);
} catch (IOException ioe) {

View File

@ -71,7 +71,7 @@ public class StreamSinkClient {
_log.error("Peer destination is not valid in " + _peerDestFile, dfe);
return;
} finally {
if (fis == null) try { fis.close(); } catch (IOException ioe) {}
if (fis != null) try { fis.close(); } catch (IOException ioe) {}
}
if (_log.shouldLog(Log.DEBUG))