GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — [java] issue-2738: Adding null check to avoid npe when switch case is default by pnimit · Pull Request #2773 · pmd/pmd ConversationDescribe the PRFor isExhaustiveEnumSwitch method, the first descendant can be null for the default switch case hence adding null check. Tried adding new unit tests for this but, I was not able to get it to work. Somehow expression type was coming out to null for switch on enums. Related issuesReady?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
Generated by 🚫 Danger |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
I'll add a test case before merging.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
[java] issue-2738: Adding null check to avoid npe when switch case is default #2773
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] Custom rule with @ExhaustiveEnumSwitch throws NPE
There was an error while loading. Please reload this page.