Branch: refs/heads/main
Home: https://github.com/pmd/pmd
Commit: 6c8bbe8df970acb04d4d5fa788318d1350b9b7a9
https://github.com/pmd/pmd/commit/6c8bbe8df970acb04d4d5fa788318d1350b9b7a9
Author: fudian <[email protected]>
Date: 2026-09-13 (Sun, 13 Sep 2026)
Changed paths:
M docs/pages/release_notes.md
M
pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/codestyle/VariableCanBeInlinedRule.java
Log Message:
-----------
[java] Deprecate statementOrderMatters property of VariableCanBeInlined (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]>
To unsubscribe from these emails, change your notification settings at
https://github.com/pmd/pmd/settings/notifications
_______________________________________________
Pmd-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmd-commits