Skip to content

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

Merged
lahodaj merged 1 commit intoapache:masterfrom
lahodaj:NETBEANS-7949
Nov 29, 2024
Merged

[NETBEANS-7949] Fixing handling of 'case null'.#7980
lahodaj merged 1 commit intoapache:masterfrom
lahodaj:NETBEANS-7949

Conversation

@lahodaj
Copy link
Copy Markdown
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 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
Copy Markdown
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
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

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