I have a class file named StaticInitializer.class
which obfuscated successfully.
When I have decompiled it I got following result where IDE gives an compiler error "Cannot return from within an initializer
". Removing "return
" statement solves the problem.
But In fact What I want to know is that how obfuscated class file works properly if it has an return
statement in static initializer.
Is there a mismatch between compiling and running phase of java files, that obfuscation detects and uses them as a way of obfuscation?
Decompiled code
public class StaticInitializer {
static {
int a=12;
int b=34;
return ;
}
}
Edited: Following operation shows that obfuscated class file is compiled with jdk 1.5
javap -c StaticInitializer.class
major version: 49
J2SE 8 = 52, J2SE 7 = 51, J2SE 6.0 = 50,
J2SE 5.0 = 49,
JDK 1.4 = 48, JDK 1.3 = 47, JDK 1.2 = 46, JDK 1.1 = 45