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

[NETBEANS-7949] Fixing handling of 'case null'. #7980

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Nov 22, 2024

This tries to handle various cases related to case null:

  • if the selector is nullable, it still won't throw an exception
  • if the selector is a variable, the variable will definitely be null inside case null and definitely not-null in other cases
  • proper handling of { yield ...; }

@lahodaj lahodaj added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests labels Nov 22, 2024
@lahodaj lahodaj added this to the NB25 milestone Nov 22, 2024
@lahodaj lahodaj requested a review from mbien November 22, 2024 17:53
@mbien mbien added the hints label Nov 22, 2024
@mbien mbien added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Nov 22, 2024
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me

@lahodaj lahodaj merged commit 5a73407 into apache:master Nov 29, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) hints Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPECheck (the “Null Pointer Dereference” hint) should support switches with case null
2 participants