8267610: NPE at at jdk.compiler/com.sun.tools.javac.jvm.Code.emitop #59
Currently, the class TransPatterns sometimes doesn't transform the
JDK-8267610 is an issue that pattern symbol causes the compiler to crash.
During transforming the InstanceOfTree (JCInstanceOf) , the
JDK-8268748 is an issue that pattern symbol causes that the compiler generates wrong bytecodes.
When transforming the BindingPatternTree (JCBindingPattern), the
These two issues are similar and influence each other. So I solve them at one patch.
If lines 208-212 are not included, the test
Thanks for taking the time to review.
The text was updated successfully, but these errors were encountered:
Thanks for looking into this and sorry for trouble. Looking at the implementation, would it make sense to set the currentValue only after the expression is translated? E.g. something like:
I think the
@lahodaj thanks for your comment.
I have tried your way before submitting this PR. But the compiler didn't work as expected.
So I revised the code like this patch which seems to use unnecessary variable
I re-read the code and my current patch seems wrong. I would like to adopt your advice and your patch. Thanks for the clarification.
I can't find the original change locally now. I try my best to recall the process. The following steps lead me to the wrong direction.
First, I might use the following patch. As you can see, I didn't get the new
Then, I look into the failed tests and found that the method
At this time, I mistakenly confirmed that both
My patch seems good to solve the bug, but actually the
After these analysis, I think my current patch may cause some new regresion because the
@lgxbslgx This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 6 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@lahodaj, @vicente-romero-oracle) but any other Committer may sponsor as well.
Going to push as commit 7ab1285.
Your commit was automatically rebased without conflicts.