Storyyeller / Krakatau

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

Krakatau v2 skips non referenced constant pool entries when assembling #208

Closed iocmet closed 2 months ago

iocmet commented 2 months ago

In class that i modifying there is non referenced constant pool entries and krakatau skips it, but they are actually used through getting from ConstantPool on runtime

Storyyeller commented 2 months ago

You can use raw reference syntax (e.g. .const [4] = Long 12312312 ) to force creation of a constant pool entry at a particular index. If you disassemble a class in roundtrip mode, it will do this automatically.