findbugs all over

This commit is contained in:
zzz
2014-10-07 14:59:49 +00:00
parent 8270a92a44
commit 28ad95f892
5 changed files with 9 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;
}