reflection method has been shrinked
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
method testForReflaction called by reflection,no other call,but testForReflaction will be skrinked,testForReflaction should not be shrinked,right?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// System.err.println(getTestData().toString());
setContentView(R.layout.activity_main3);
try {
Class clazz= Class.forName("com.test.TmpUtils");
Method method= clazz.getDeclaredMethod("testForReflaction",null);
method.invoke(null,null);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
ProGuard 6.0 beta1 recognizes this construct. You can download its zip file from https://sourceforge.net/projects/proguard/files
ProGuard 5.3.3 recognizes the construct if you replace the argument "null" by "new Class[0]".
Diff: