From 03e957db94dc032e8cffcb60119fb5b097b89180 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Thu, 14 Jun 2012 05:21:09 +0000 Subject: [PATCH] Fixed issue 10 --- src/com/esotericsoftware/reflectasm/AccessClassLoader.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/com/esotericsoftware/reflectasm/AccessClassLoader.java b/src/com/esotericsoftware/reflectasm/AccessClassLoader.java index c153522..cdd18fb 100644 --- a/src/com/esotericsoftware/reflectasm/AccessClassLoader.java +++ b/src/com/esotericsoftware/reflectasm/AccessClassLoader.java @@ -3,10 +3,9 @@ package com.esotericsoftware.reflectasm; import java.lang.reflect.Method; import java.util.ArrayList; -import java.util.HashMap; class AccessClassLoader extends ClassLoader { - static private ArrayList accessClassLoaders = new ArrayList(); + static private final ArrayList accessClassLoaders = new ArrayList(); static AccessClassLoader get (Class type) { ClassLoader parent = type.getClassLoader(); @@ -40,7 +39,7 @@ class AccessClassLoader extends ClassLoader { Method method = ClassLoader.class.getDeclaredMethod("defineClass", new Class[] {String.class, byte[].class, int.class, int.class}); method.setAccessible(true); - return (Class)method.invoke(getParent(), new Object[] {name, bytes, new Integer(0), new Integer(bytes.length)}); + return (Class)method.invoke(getParent(), new Object[] {name, bytes, Integer.valueOf(0), Integer.valueOf(bytes.length)}); } catch (Exception ignored) { } return defineClass(name, bytes, 0, bytes.length);