forked from I2P_Developers/i2p.i2p
misc. findbugs fixes
This commit is contained in:
@ -783,7 +783,7 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
throw ioe;
|
||||
} finally {
|
||||
try {
|
||||
if (out == null)
|
||||
if (out != null)
|
||||
out.close();
|
||||
} catch (IOException ioe) {}
|
||||
}
|
||||
|
@ -1189,7 +1189,9 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
|
||||
String filename = null;
|
||||
try {
|
||||
filename = targetRequest.substring(LOCAL_SERVER.length() + 8, space); // "/themes/".length
|
||||
} catch (IndexOutOfBoundsException ioobe) {}
|
||||
} catch (IndexOutOfBoundsException ioobe) {
|
||||
return;
|
||||
}
|
||||
// theme hack
|
||||
if (filename.startsWith("console/default/"))
|
||||
filename = filename.replaceFirst("default", I2PAppContext.getGlobalContext().getProperty("routerconsole.theme", "light"));
|
||||
|
@ -125,9 +125,9 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
|
||||
*/
|
||||
public static class IrcInboundFilter implements Runnable {
|
||||
|
||||
private Socket local;
|
||||
private I2PSocket remote;
|
||||
private StringBuffer expectedPong;
|
||||
private final Socket local;
|
||||
private final I2PSocket remote;
|
||||
private final StringBuffer expectedPong;
|
||||
private final Log _log;
|
||||
|
||||
public IrcInboundFilter(Socket _local, I2PSocket _remote, StringBuffer pong, Log log) {
|
||||
@ -191,7 +191,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
|
||||
} catch (RuntimeException re) {
|
||||
_log.error("Error filtering inbound data", re);
|
||||
} finally {
|
||||
if (local != null) try { local.close(); } catch (IOException e) {}
|
||||
try { local.close(); } catch (IOException e) {}
|
||||
}
|
||||
if(_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("IrcInboundFilter: Done.");
|
||||
@ -204,9 +204,9 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
|
||||
*/
|
||||
public static class IrcOutboundFilter implements Runnable {
|
||||
|
||||
private Socket local;
|
||||
private I2PSocket remote;
|
||||
private StringBuffer expectedPong;
|
||||
private final Socket local;
|
||||
private final I2PSocket remote;
|
||||
private final StringBuffer expectedPong;
|
||||
private final Log _log;
|
||||
|
||||
public IrcOutboundFilter(Socket _local, I2PSocket _remote, StringBuffer pong, Log log) {
|
||||
@ -270,7 +270,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
|
||||
} catch (RuntimeException re) {
|
||||
_log.error("Error filtering outbound data", re);
|
||||
} finally {
|
||||
if (remote != null) try { remote.close(); } catch (IOException e) {}
|
||||
try { remote.close(); } catch (IOException e) {}
|
||||
}
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("IrcOutboundFilter: Done.");
|
||||
|
@ -25,6 +25,8 @@ public abstract class FormatDate
|
||||
|
||||
public static String format(long date)
|
||||
{
|
||||
return _dateFormat.format(new Date(date));
|
||||
synchronized(_dateFormat) {
|
||||
return _dateFormat.format(new Date(date));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user