Branch: refs/heads/main
Home: https://github.com/pmd/pmd
Commit: e80f72553ed05032b03fe444a855a791f6b468cb
https://github.com/pmd/pmd/commit/e80f72553ed05032b03fe444a855a791f6b468cb
Author: Subhadeep <[email protected]>
Date: 2026-09-06 (Sun, 06 Sep 2026)
Changed paths:
M docs/pages/release_notes.md
M
pmd-doc/src/main/java/net/sourceforge/pmd/doc/internal/DeadLinksChecker.java
M
pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/NonThreadSafeSingletonRule.java
M pmd-java/src/main/resources/category/java/multithreading.xml
M
pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/NonThreadSafeSingleton.xml
Log Message:
-----------
[java] Fix #6780: NonThreadSafeSingleton checkNonStaticMethods contradicting
impl (#6864)
* [java] Fix NonThreadSafeSingleton checkNonStaticMethods contradicting its
description (#6780)
checkNonStaticMethods=true (the default) was silently skipping
non-static methods instead of checking them - the exact opposite
of the documented behavior. Inverted the condition so the flag
now matches its Javadoc, and added regression tests covering both
the default (checked) and checkNonStaticMethods=false (skipped)
cases.
* Update NonThreadSafeSingleton.xml for consistency
* Deprecate non-static methods check in NonThreadSafeSingletonRule
Updated the NonThreadSafeSingletonRule to remove the check for non-static
methods as it is now always enforced. Added deprecation notice for the ignored
property.
* Update NonThreadSafeSingleton.xml test data
* Use constant for "!deprecated" rule property
* Add additional tests
- for suppressing via xpath
- for checkNonStaticFields
* NonThreadSafeSingleton: Improve rule documentation
* Update release notes (#6780, #6864)
* Fix dead links checker
* NonThreadSafeSingleton: Use ASTVariableId instead of field names
This makes sure, we resolve the correct
fields in case of shadowing.
---------
Co-authored-by: dweep <existing1.001@gmail>
Co-authored-by: Andreas Dangel <[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