Changes for 21w19a+/J16 #96
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With 21w19a, Mojang changed a lot of their build toolchain around. This PR aims to patch up the decompiler for some of the bytecode changes that resulted.
Objects.requireNonNull
This is the simplest change -- javac generates nullness checks a bit differently. FF is patched to support both the old .getClass() and new Objects.requireNonNull() variants.
Inner classes
It appears that a lot of inner classes have gained a
Signatureattribute, which causes generic signature processing to activate. This exposed some issues in its handling of synthetic constructor parameters, which I think I've taken care of enough to correctly(not sure how these changes would react if someone disabled enum handling though)
Visibility changes
There have been broad changes to field and method visibility anywhere inner classes are involved, which appears to be done by a tool that results in inconsistent inner class attributes. I've added an option to suppress that warning,
-win=0try-with-resources (not done yet)
looks like FF isn't collapsing finally blocks properly -- there are a bunch of changes to exception ranges in the bytecode that may be related, haven't looked too much
nextGaussian (not done yet)
#89, will look at applying the proposed fix more properly
I've tested this based off of diffs of 21w19a -- once I make it through the list of issues above I'll do a more thorough comparison on 1.16.5 to ensure nothing regressed on that end.
cc @SuperCoder7979 who I discussed a lot of this with