3 ms·
0 is the first element in the array; so, I bet that wasn't a constant, but honestly what the programmer did. In either case, we have the bytecode; and shouldn'
by sukuriant 14y ago
0 is the first element in the array; so, I bet that wasn't a constant, but honestly what the programmer did.
In either case, we have the bytecode; and shouldn't what is written above compile to the same bytecode?
- gardarh 14y agoTo demonstrate my point, try writing the following into C.java: public class C { public int foo() { return 1; int b = 1 + 2; } } Then compile it (javac C.java). You will get the following: C.java:4: unreachable statement int b = 1 + 2; ^ C.java:5: missing return statement } ^ 2 errors Therefore this code is not compileable, thus telling us that the initial code blob could never have run in the first place. I'm not sure why the decompiler returns non-compiling java code, I just know it does.
- jgeralnik 14y agoSome code obfuscators will introduce illegal programming constructs. Most VMs will tolerate these but the decompiled source cannot be recompiled without fixing these. Not saying that's what happened here, but it is an option.
- sukuriant 14y agoSo it is a very real possibility that an obfuscation technique that basically throws random bits of code with random extra params in another method and calls them at it would could have been used here. Interesting. It would certainly make more sense.