JDK-8289894: A NullPointerException thrown from guard expression #120
Conversation
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
LGTM 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks sensible
@lahodaj This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 9 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 ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 25f4b04.
Your commit was automatically rebased without conflicts. |
Consider the following code:
In the current specification, the guard should not be invoked when
o
isnull
, but javac will invoke it, for historical reasons.Also, as opposed to JDK 18/JEP 420,
case null, <pattern>
is allowed for parenthesized pattern when the parenthesized pattern encloses (directly or via other parenthesized patterns) a type pattern.The patch proposed here strives to fix both of these problems.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk19 pull/120/head:pull/120
$ git checkout pull/120
Update a local copy of the PR:
$ git checkout pull/120
$ git pull https://git.openjdk.org/jdk19 pull/120/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 120
View PR using the GUI difftool:
$ git pr show -t 120
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk19/pull/120.diff