The following violations were reported from backport which is Checkstyle but using Java 8. They look valid to me.
[INFO] --- maven-pmd-plugin:3.19.0:check (default) @ checkstyle-backport-jre8 ---
[INFO] PMD version: 6.49.0
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ArchUnitSuperClassTest:89 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ArchUnitSuperClassTest:111 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:213 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:219 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:239 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:261 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:263 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:284 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.ImmutabilityTest:304 Rule:AccessorClassGeneration Priority:3 Avoid instantiation through private constructors from outside of the constructors class..
Changing all private constructors to /* package */
fixed the PMD.
After investigation, it was determined that this check does not run on Java 11 projects because the compiler made improvements to the acessor that this isn't needed anymore. See pmd/pmd#4140 (comment) .
This issue will remove the suppressions for Accessors from PMD, and revert code back (where allowed) to private
as they were originally.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4