forked from I2P_Developers/i2p.i2p
findbugs all over
This commit is contained in:
@ -185,7 +185,6 @@ class Sorters {
|
||||
|
||||
private static int getStatus(Snark snark) {
|
||||
long remaining = snark.getRemainingLength();
|
||||
long needed = snark.getNeededLength();
|
||||
if (snark.isStopped()) {
|
||||
if (remaining < 0)
|
||||
return 0;
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
package org.mortbay.util;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Byte Array Pool
|
||||
@ -29,7 +30,7 @@ public class ByteArrayPool
|
||||
Integer.getInteger("org.mortbay.util.ByteArrayPool.pool_size",8).intValue();
|
||||
|
||||
public static final ThreadLocal __pools=new BAThreadLocal();
|
||||
public static int __slot;
|
||||
public static final AtomicInteger __slot = new AtomicInteger();
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Get a byte array from the pool of known size.
|
||||
@ -94,7 +95,7 @@ public class ByteArrayPool
|
||||
}
|
||||
|
||||
// slot.
|
||||
int s = __slot++;
|
||||
int s = __slot.getAndIncrement();
|
||||
if (s<0)s=-s;
|
||||
pool[s%pool.length]=b;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import net.i2p.I2PAppContext;
|
||||
* @since 0.9.14
|
||||
*/
|
||||
public class DomainSocketFactory {
|
||||
public static String I2CP_SOCKET_ADDRESS = "net.i2p.client.i2cp";
|
||||
public static final String I2CP_SOCKET_ADDRESS = "net.i2p.client.i2cp";
|
||||
|
||||
/**
|
||||
* @throws UnsupportedOperationException always
|
||||
|
@ -846,7 +846,11 @@ public class Ed25519FieldElement extends FieldElement {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return t.hashCode(); // TODO should this be something else?
|
||||
int rv = 0;
|
||||
for (int i = 0; i < 10; i++) {
|
||||
rv ^= t[i];
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -569,7 +569,6 @@ class UDPPacketReader {
|
||||
* @since 0.9.16
|
||||
*/
|
||||
public int highestReceived() {
|
||||
int count = fragmentCount();
|
||||
for (int i = _bitfieldSize - 1; i >= 0; i--) {
|
||||
byte b = _message[_bitfieldStart + i];
|
||||
if ((b & 0x7f) == 0)
|
||||
|
Reference in New Issue
Block a user