forked from I2P_Developers/i2p.i2p
findbugs
This commit is contained in:
@@ -292,11 +292,9 @@ class HTTPResponseOutputStream extends FilterOutputStream {
|
||||
} finally {
|
||||
if (_log.shouldLog(Log.INFO) && (_in != null))
|
||||
_log.info("After decompression, written=" + written +
|
||||
(_in != null ?
|
||||
" read=" + _in.getTotalRead()
|
||||
+ ", expanded=" + _in.getTotalExpanded() + ", remaining=" + _in.getRemaining()
|
||||
+ ", finished=" + _in.getFinished()
|
||||
: ""));
|
||||
+ ", finished=" + _in.getFinished());
|
||||
if (ba != null)
|
||||
_cache.release(ba);
|
||||
if (_out != null) try {
|
||||
|
@@ -212,10 +212,11 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
|
||||
}
|
||||
}
|
||||
if (sockMgr == null) {
|
||||
l.log("Invalid I2CP configuration");
|
||||
throw new IllegalArgumentException("Socket manager could not be created");
|
||||
}
|
||||
// can't be null unless we limit the loop above
|
||||
//if (sockMgr == null) {
|
||||
// l.log("Invalid I2CP configuration");
|
||||
// throw new IllegalArgumentException("Socket manager could not be created");
|
||||
//}
|
||||
l.log("Tunnels ready for client: " + handlerName);
|
||||
|
||||
} // else delay creating session until createI2PSocket() is called
|
||||
@@ -556,7 +557,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
if (localPort == 0) {
|
||||
localPort = ss.getLocalPort();
|
||||
}
|
||||
notifyEvent("clientLocalPort", new Integer(ss.getLocalPort()));
|
||||
notifyEvent("clientLocalPort", Integer.valueOf(ss.getLocalPort()));
|
||||
// duplicates message in constructor
|
||||
//l.log("Listening for clients on port " + localPort + " of " + getTunnel().listenHost);
|
||||
|
||||
|
@@ -412,9 +412,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
|
||||
protected static String formatHeaders(Map<String, List<String>> headers, StringBuilder command) {
|
||||
StringBuilder buf = new StringBuilder(command.length() + headers.size() * 64);
|
||||
buf.append(command.toString().trim()).append("\r\n");
|
||||
for (Iterator<String> iter = headers.keySet().iterator(); iter.hasNext(); ) {
|
||||
String name = (String)iter.next();
|
||||
for(String val: headers.get(name)) {
|
||||
for (Map.Entry<String, List<String>> e : headers.entrySet()) {
|
||||
String name = e.getKey();
|
||||
for(String val: e.getValue()) {
|
||||
buf.append(name.trim()).append(": ").append(val.trim()).append("\r\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user