Remove redundant array creations for calling varargs methods

This commit is contained in:
thatsIch
2014-11-04 02:05:09 +01:00
parent bff5a3ec5c
commit ff584ab627
3 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ public class ApiPart implements IPartHelper
ClassLoader loader = getClass().getClassLoader();// ClassLoader.getSystemClassLoader();
Class<ClassLoader> root = ClassLoader.class;
Class<? extends ClassLoader> cls = loader.getClass();
Method defineClassMethod = root.getDeclaredMethod( "defineClass", new Class[] { String.class, byte[].class, int.class, int.class } );
Method runTransformersMethod = cls.getDeclaredMethod( "runTransformers", new Class[] { String.class, String.class, byte[].class } );
Method defineClassMethod = root.getDeclaredMethod( "defineClass", String.class, byte[].class, int.class, int.class );
Method runTransformersMethod = cls.getDeclaredMethod( "runTransformers", String.class, String.class, byte[].class );
runTransformersMethod.setAccessible( true );
defineClassMethod.setAccessible( true );