Changeset 3d38522


Ignore:
Timestamp:
Aug 9, 2017 9:24:02 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
51d4827
Parents:
2441484
Message:

findbugs all over

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • apps/BOB/src/net/i2p/BOB/MUXlisten.java

    r2441484 r3d38522  
    4646        private final String N;
    4747        private ServerSocket listener;
    48         private final int backlog = 50; // should this be more? less?
     48        private static final int backlog = 50; // should this be more? less?
    4949        private final boolean go_out;
    5050        private final boolean come_in;
  • apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java

    r2441484 r3d38522  
    847847     *  @return success
    848848     */
     849/****
    849850    private boolean sendError(NodeInfo nInfo, MsgID msgID, int err, String msg) {
    850851        if (_log.shouldLog(Log.INFO))
     
    857858        return sendError(nInfo, msgID, map);
    858859    }
     860****/
    859861
    860862    // Low-level send methods
  • apps/imagegen/imagegen/webapp/src/main/java/net/i2p/imagegen/RandomArt.java

    r2441484 r3d38522  
    246246                //base += mod * 16;
    247247                //base += mod * 16 * 256;
    248                 base += mod * 5 * 256 * 256;
     248                base += mod * (5 * 256 * 256L);
    249249        }
    250250        if (base > 0xffffff || base < 0)
  • apps/routerconsole/java/src/net/i2p/router/news/NewsManager.java

    r2441484 r3d38522  
    191191
    192192    private List<NewsEntry> parseInitialNews() {
    193         NewsEntry entry = new NewsEntry();
    194193        File file = new File(_context.getBaseDir(), "docs/initialNews/initialNews.xml");
    195194        Reader reader = null;
  • apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java

    r2441484 r3d38522  
    147147            }
    148148            buf.append("<td align=\"right\">");
    149             String v = info.getOption("router.version");
     149            String v = info != null ? info.getOption("router.version") : null;
    150150            if (v != null)
    151151                buf.append(DataHelper.stripHTML(v));
  • apps/routerconsole/java/src/net/i2p/router/web/SybilRenderer.java

    r2441484 r3d38522  
    234234        Map<Hash, TunnelPool> clientInboundPools = _context.tunnelManager().getInboundClientPools();
    235235        List<Hash> destinations = new ArrayList<Hash>(clientInboundPools.keySet());
    236         boolean debug = _context.getBooleanProperty(HelperBase.PROP_ADVANCED);
     236        //boolean debug = _context.getBooleanProperty(HelperBase.PROP_ADVANCED);
    237237        for (Hash client : destinations) {
    238238            boolean isLocal = _context.clientManager().isLocal(client);
     
    319319        }
    320320
    321         double avg = total / (sz * sz / 2);
     321        double avg = total / (sz * sz / 2d);
    322322        buf.append("<h3 class=\"sybils\">Average Floodfill Distance is ").append(fmt.format(avg)).append("</h3>");
    323323
  • apps/sam/java/src/net/i2p/sam/SAMv3Handler.java

    r2441484 r3d38522  
    174174                try {
    175175                        Socket socket = getClientSocket().socket();
    176                         InputStream in = socket.getInputStream();
    177 
    178176                        StringBuilder buf = new StringBuilder(1024);
    179177                        boolean gotFirstLine = false;
  • apps/susimail/src/src/i2p/susi/webmail/WebMail.java

    r2441484 r3d38522  
    20502050                                sessionObject.error += e.getMessage();
    20512051                        }
    2052                         String boundary = "_="+(int)(Math.random()*Integer.MAX_VALUE)+""+(int)(Math.random()*Integer.MAX_VALUE);
     2052                        String boundary = "_=" + I2PAppContext.getGlobalContext().random().nextLong();
    20532053                        boolean multipart = false;
    20542054                        if( sessionObject.attachments != null && !sessionObject.attachments.isEmpty() ) {
  • core/java/src/net/i2p/crypto/KeyStoreUtil.java

    r2441484 r3d38522  
    600600        }
    601601        Object[] rv = SelfSignedGenerator.generate(cname, ou, null, "I2P Anonymous Network", null, null, validDays, type);
    602         PublicKey jpub = (PublicKey) rv[0];
     602        //PublicKey jpub = (PublicKey) rv[0];
    603603        PrivateKey jpriv = (PrivateKey) rv[1];
    604604        X509Certificate cert = (X509Certificate) rv[2];
    605         X509CRL crl = (X509CRL) rv[3];
     605        //X509CRL crl = (X509CRL) rv[3];
    606606        List<X509Certificate> certs = Collections.singletonList(cert);
    607607        storePrivateKey(ks, ksPW, alias, keyPW, jpriv, certs);
  • core/java/src/net/i2p/crypto/SelfSignedGenerator.java

    r2441484 r3d38522  
    714714    private static final void test(String name, SigType type) throws Exception {
    715715            Object[] rv = generate("cname@example.com", "ou", "o", null, "st", "c", 3652, type);
    716             PublicKey jpub = (PublicKey) rv[0];
     716            //PublicKey jpub = (PublicKey) rv[0];
    717717            PrivateKey jpriv = (PrivateKey) rv[1];
    718718            X509Certificate cert = (X509Certificate) rv[2];
  • core/java/src/net/i2p/util/EepGet.java

    r2441484 r3d38522  
    13971397            // This is kindof a hack, but if we are downloading a gzip file
    13981398            // we don't want to transparently gunzip it and save it as a .gz file.
    1399             (!path.endsWith(".gz")) && (!path.endsWith(".tgz")))
     1399            path == null ||
     1400            (!path.endsWith(".gz") && !path.endsWith(".tgz")))
    14001401            buf.append("gzip");
    14011402        buf.append("\r\n");
  • router/java/src/net/i2p/data/router/RouterKeyGenerator.java

    r2441484 r3d38522  
    229229        int st = 0;
    230230        if (args.length > 1 && (args[0].startsWith("+") || args[0].startsWith("-"))) {
    231             now += Integer.parseInt(args[0]) * 24*60*60*1000L;
     231            now += Integer.parseInt(args[0]) * (24*60*60*1000L);
    232232            st++;
    233233        }
  • router/java/src/net/i2p/router/RouterVersion.java

    r2441484 r3d38522  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 0;
     21    public final static long BUILD = 1;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/startup/WorkingDir.java

    r2441484 r3d38522  
    463463        boolean rv = true;
    464464
    465         byte buf[] = new byte[4096];
    466465        FileInputStream in = null;
    467466        FileOutputStream out = null;
Note: See TracChangeset for help on using the changeset viewer.