bytecode-viewer icon indicating copy to clipboard operation
bytecode-viewer copied to clipboard

fernflower doesn't preserve local var/parameter names always

Open jredfox opened this issue 3 years ago • 0 comments

java version: 1.8.0_321 version: Bytecode-Viewer-2.11.0

Issue: it will say var0 instead of saying meta as a local variable. I noticed this also occurs with parameter naming

steps to reprocude:

  1. download the minecraft.jar https://launcher.mojang.com/v1/objects/7b07fd09d1e3aae1bc7a1304fedc73bfe5d81800/client.jar
  2. download the mapping file https://launcher.mojang.com/v1/objects/a0bea08f0b96f6f30a350cd75270be63f7d0aac4/client.txt
  3. deob with recaf https://github.com/Col-E/Recaf and make sure to select proguard mappings
  4. export jar with recaf name it 1.15-deob.jar
  5. open jar with bytecode viewer
  6. decompile all classes using fernflower
  7. net/minecraft/world/item/ArrowItem.java notice the local var name is obfuscated while doing the same steps with cfr will result in a deob name

possible issues: did I try it using java 17 no? was an error thrown no. I also launched using start java -jar command and no visible errors.

jredfox avatar Feb 23 '22 10:02 jredfox