Changeset 9d4cc26


Ignore:
Timestamp:
Jul 8, 2011 5:40:43 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
44f4e55
Parents:
f173e88
Message:

misc. findbugs fixes

Location:
apps
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    rf173e88 r9d4cc26  
    784784        } finally {
    785785            try {
    786                 if (out == null)
     786                if (out != null)
    787787                    out.close();
    788788            } catch (IOException ioe) {}
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    rf173e88 r9d4cc26  
    11901190            try {
    11911191                filename = targetRequest.substring(LOCAL_SERVER.length() + 8, space); // "/themes/".length
    1192             } catch (IndexOutOfBoundsException ioobe) {}
     1192            } catch (IndexOutOfBoundsException ioobe) {
     1193                 return;
     1194            }
    11931195            // theme hack
    11941196            if (filename.startsWith("console/default/"))
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelIRCClient.java

    rf173e88 r9d4cc26  
    126126    public static class IrcInboundFilter implements Runnable {
    127127       
    128         private Socket local;
    129         private I2PSocket remote;
    130         private StringBuffer expectedPong;
     128        private final Socket local;
     129        private final I2PSocket remote;
     130        private final StringBuffer expectedPong;
    131131        private final Log _log;
    132132               
     
    192192                _log.error("Error filtering inbound data", re);
    193193            } finally {
    194                 if (local != null) try { local.close(); } catch (IOException e) {}
     194                try { local.close(); } catch (IOException e) {}
    195195            }
    196196            if(_log.shouldLog(Log.DEBUG))
     
    205205        public static class IrcOutboundFilter implements Runnable {
    206206                   
    207             private Socket local;
    208             private I2PSocket remote;
    209             private StringBuffer expectedPong;
     207            private final Socket local;
     208            private final I2PSocket remote;
     209            private final StringBuffer expectedPong;
    210210            private final Log _log;
    211211               
     
    271271                    _log.error("Error filtering outbound data", re);
    272272                } finally {
    273                     if (remote != null) try { remote.close(); } catch (IOException e) {}
     273                    try { remote.close(); } catch (IOException e) {}
    274274                }
    275275                if (_log.shouldLog(Log.DEBUG))
  • apps/susidns/src/java/src/i2p/susi/dns/FormatDate.java

    rf173e88 r9d4cc26  
    2626    public static String format(long date)
    2727    {
    28         return _dateFormat.format(new Date(date));
     28        synchronized(_dateFormat) {
     29                return _dateFormat.format(new Date(date));
     30        }
    2931    }
    3032}
Note: See TracChangeset for help on using the changeset viewer.