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] Fix #5159: UnusedAssignment: an assert statement may not run by Eljees · Pull Request #7104 · pmd/pmd Conversation
Contributor
Describe the PR
boolean assertionsAreEnabled = false; assert assertionsAreEnabled = true; if (assertionsAreEnabled) { ... } Here the rule reported
TestsThree cases in
Without the change the first two fail ( Related issuesReady?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAssertions are disabled by default, so the dataflow pass must not treat an assert as always evaluated. Visit its condition and detail message in a forked state and join it with the state before the statement. Fixes pmd#5159
|
There was an error while loading. Please reload this page.
|
Compared to main: (comment created at 2026-09-25 20:44:52+00:00 for b082d30) |
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!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] UnusedAssignment: False positive when using assert
There was an error while loading. Please reload this page.