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 #5770: New Rule: VariableCanBeInlined by Pankraz76 · Pull Request #5847 · pmd/pmd Conversation
|
|
Compared to main: (comment created at 2025-08-08 10:06:18+00:00 for d5e111a) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
fa07c3c to
df87f06
Compare
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.
UnnecessaryLocalBeforeReturnOrThrowsRule
e3fd927 to
e6f5266
Compare
UnnecessaryLocalBeforeReturnOrThrowsRuleUnnecessaryLocalBeforeReturnRule to UnnecessaryLocalBeforeReturnOrThrowsRule
cf0e12e to
6d31e91
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I think the new name is too specific because this rule could as well apply to yield statements. I think the best applicable names would be Or even BeforeControlFlowTransfer if you think those are too obscure. I would think people know what a jump is though. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
thanks for the Yes then might use Branch is generic and known in the dev context. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
UnnecessaryLocalBeforeReturnRule to UnnecessaryLocalBeforeReturnOrThrowsRuleUnnecessaryLocalBeforeReturnRule to UnnecessaryLocalBeforeBranch
e703fd7 to
7538251
Compare
|
Let's first fix specification before continuing on the pull request, so that we know, what to do: #5770 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d5111fa to
c9a957b
Compare
UnnecessaryLocalBeforeReturnRule to UnnecessaryLocalBeforeBranchUnnecessaryLocalBeforeReturnRule and UnnecessaryLocalBeforeBranch into VariableCanBeInlined
UnnecessaryLocalBeforeReturnRule and UnnecessaryLocalBeforeBranch into VariableCanBeInlinedVariableCanBeInlined
c9a957b to
de5e6d5
Compare
|
check issue: again broken window effect still not closed. [INFO] There are 2 errors reported by Checkstyle 10.26.1 with /net/sourceforge/pmd/pmd-checkstyle-config.xml ruleset. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
422d5aa to
d5e111a
Compare
VariableCanBeInlinedThere was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updated PR!
Unfortunately, it is not ready yet, but almost! Can you please have a look?
And don't worry about the release notes, I'll update it once the PR is ready to be merged.
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.
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.
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.
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.
|
Compared to main: (comment created at 2025-08-15 09:46:47+00:00 for a2eb2e4) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e7140d2 to
728d0e4
Compare
VariableCanBeInlined
VariableCanBeInlined
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.
I've updated the PR myself (you seem to have not noticed the comments in the middle?).
If CI looks good, I'll merge it later today.
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.
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.
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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…ed (refs #3124) (#7065) * [java] Fix #3124: Deprecate statementOrderMatters property of VariableCanBeInlined The property silently migrated into the replacement rule when UnnecessaryLocalBeforeReturn was deprecated (#5847): setting it to false relaxes the rule under the assumption that the statements between the declaration and the return/throw have no side effects, which is unsafe and could introduce an application bug when following the suggestion. Mark the property as deprecated using DEPRECATED_RULE_PROPERTY_MARKER: configuring it now issues a warning when the ruleset is loaded, and the rule documentation displays a deprecated label. Behavior is unchanged while deprecated (the conservative default, statementOrderMatters=true, stays the default); the property will be removed later. Signed-off-by: 付典 <[email protected]> * New rule name in changelog entry * We really don't need a test for that. Only make actually removing the property harder. * Explicitely call out the deprecation/removal version. --------- Signed-off-by: 付典 <[email protected]> Co-authored-by: Sören Glimm <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] New Rule: VariableCanBeInlined: Local variables should not be declared and then immediately returned or thrown
There was an error while loading. Please reload this page.