Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

illegal class/method/package names or modifiers #184

Closed minus1ms closed 2 years ago

minus1ms commented 2 years ago

Can decompiler rename illegal class names like "new" or illegal package names like "native"?? It will be helpful, I think that decompiler should decompile to legal java code without any errors...

minus1ms commented 2 years ago

Also it should do something with static classes because these are not allowed too

Storyyeller commented 2 years ago

There's a lot of things you can do in Java bytecode that have no equivalent in the Java language. Krakatau does its best to map bytecode into legal Java, but when that is impossible, it strives to provide Java-like code that is at least useful for reverse engineering.

Automatic renaming has downsides, because it can be confusing for reverse engineers if they don't realize things have been renamed, and it breaks reflection, etc.