Handle nest mates in field access normalization for reobf
Machine-Maker opened this issue · comments
https://paste.gg/p/anonymous/bc5bd319557649dab00ac8710688b9fd
After applying this commit
No issues when I tested with createMojmapBundlerJar but got the same error when I used createReobfBundlerJar
I had to add an extra access transformer to fix the issue. See this commit
The underlined casts are causing the illegal access
Additional context:
JDK 11 added the concept of nest mates which allows classes to access private members of other classes when they are declared as "nest mates" by the owner class.
The field access normalizer in FixJarForReobf
does not take this into consideration: https://github.com/PaperMC/paperweight/blob/main/paperweight-lib/src/main/kotlin/tasks/FixJarForReobf.kt#L200-L203