Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle nest mates in field access normalization for reobf #122

Open
Machine-Maker opened this issue Dec 1, 2021 · 1 comment
Open

Handle nest mates in field access normalization for reobf #122

Machine-Maker opened this issue Dec 1, 2021 · 1 comment

Comments

@Machine-Maker
Copy link
Member

Machine-Maker commented Dec 1, 2021

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

image

The underlined casts are causing the illegal access

@DenWav DenWav changed the title Reobf inconsistencies Handle nest mates in field access normalization for reobf Dec 1, 2021
@DenWav
Copy link
Member

DenWav commented Dec 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants