Branch: refs/heads/main
Home: https://github.com/pmd/pmd
Commit: ffc2425bc0c5f13079b99dbec06649ab4bcb28d8
https://github.com/pmd/pmd/commit/ffc2425bc0c5f13079b99dbec06649ab4bcb28d8
Author: Eljees <[email protected]>
Date: 2026-08-07 (Fri, 07 Aug 2026)
Changed paths:
M docs/pages/release_notes.md
M
pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/errorprone/CloseResourceRule.java
M
pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/CloseResource.xml
Log Message:
-----------
[java] Fix #6742: CloseResource false positive for a wrapped resource
assigned without an initializer (#6918)
* [java] Fix #6742: CloseResource false positive for a wrapped resource
assigned without an initializer
getWrappedResourceType only looked at the variable initializer, so the split
declaration/assignment form did not recognize the wrapping resource and was
reported. Per JLS 14.4.2 both shapes are equivalent.
Signed-off-by: Eljees <[email protected]>
* [java] CloseResource: drop the two #2840 test cases from this PR
Both were raised in review. The direct-return case duplicates the existing
'#1011 CloseResource Rule ignores Constructors' test a few hundred lines up,
and the nested-block one is not about #2840 at all - neither belongs in a
change scoped to #6742. CloseResourceTest: 101 tests, 0 failures.
Signed-off-by: Eljees <[email protected]>
* [docs] Update release notes
* Empty commit to re-trigger CI
---------
Signed-off-by: Eljees <[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