MinecraftForge / ForgeFlower

Forge's modifications to FernFlower. Fixing various bugs/inconsistencies. Main Repo: https://github.com/MinecraftForge/FernFlower
Apache License 2.0
80 stars 44 forks source link

Handle J9+ using Objects.requireNonNull rather than .getClass for null checks #97

Closed zml2008 closed 3 years ago

zml2008 commented 3 years ago

Broken out of #96

This is the simplest change -- javac generates nullness checks a bit differently starting with a Java 9 target. FF is patched to support both the old .getClass() and new Objects.requireNonNull() variants.

I tossed in some more debug logging since I was looking forward to some of the other decompile errors that were introduced at the same time.

Diffs (via VanillaGradle workspace)

1.16.5: no change 21w19a: https://paste.gg/p/zml/9e50e0aa7d7c4ab78790f7b5d4b575d1