forked from I2P_Developers/i2p.i2p
lint core, i2psnark, jetty, susimail
This commit is contained in:
@@ -72,6 +72,7 @@ public class JettyStart implements ClientApp {
|
||||
/**
|
||||
* Modified from XmlConfiguration.main()
|
||||
*/
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void parseArgs(String[] args) throws Exception {
|
||||
Properties properties=new Properties();
|
||||
XmlConfiguration last=null;
|
||||
|
||||
@@ -84,6 +84,7 @@ public class XSSRequestWrapper extends HttpServletRequestWrapper {
|
||||
* Parameter names starting with "nofilter_" will not be filtered.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public Map getParameterMap() {
|
||||
Map rv = new HashMap();
|
||||
for (Enumeration keys = getParameterNames(); keys.hasMoreElements(); ) {
|
||||
|
||||
@@ -219,6 +219,7 @@ public class MultiPartRequest
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Hashtable[] getMultipleParams(String name)
|
||||
{
|
||||
List<Object> parts = _partMap.getValues(name);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ByteArrayPool
|
||||
public static final int __POOL_SIZE=
|
||||
Integer.getInteger("org.mortbay.util.ByteArrayPool.pool_size",8).intValue();
|
||||
|
||||
public static final ThreadLocal __pools=new BAThreadLocal();
|
||||
public static final ThreadLocal<byte[][]> __pools = new BAThreadLocal();
|
||||
public static final AtomicInteger __slot = new AtomicInteger();
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@@ -39,7 +39,7 @@ public class ByteArrayPool
|
||||
*/
|
||||
public static byte[] getByteArray(int size)
|
||||
{
|
||||
byte[][] pool = (byte[][])__pools.get();
|
||||
byte[][] pool = __pools.get();
|
||||
boolean full=true;
|
||||
for (int i=pool.length;i-->0;)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public class ByteArrayPool
|
||||
/* ------------------------------------------------------------ */
|
||||
public static byte[] getByteArrayAtLeast(int minSize)
|
||||
{
|
||||
byte[][] pool = (byte[][])__pools.get();
|
||||
byte[][] pool = __pools.get();
|
||||
for (int i=pool.length;i-->0;)
|
||||
{
|
||||
if (pool[i]!=null && pool[i].length>=minSize)
|
||||
@@ -84,7 +84,7 @@ public class ByteArrayPool
|
||||
if (b==null)
|
||||
return;
|
||||
|
||||
byte[][] pool = (byte[][])__pools.get();
|
||||
byte[][] pool = __pools.get();
|
||||
for (int i=pool.length;i-->0;)
|
||||
{
|
||||
if (pool[i]==null)
|
||||
@@ -103,9 +103,10 @@ public class ByteArrayPool
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------ */
|
||||
private static final class BAThreadLocal extends ThreadLocal
|
||||
private static final class BAThreadLocal extends ThreadLocal<byte[][]>
|
||||
{
|
||||
protected Object initialValue()
|
||||
@Override
|
||||
protected byte[][] initialValue()
|
||||
{
|
||||
return new byte[__POOL_SIZE][];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user