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] MissingStaticMethodInNonInstantiatableClass should consider Lombok's @UtilityClass · Issue #4224 · pmd/pmd Closed Labels a:false-negativePMD doesn't flag a problematic piece of code Milestone DescriptionAffects PMD Version:6.51.0 Rule: MissingStaticMethodInNonInstantiatableClass Please provide the rule name and a link to the rule documentation: Description: Lombok documentation: https://projectlombok.org/features/experimental/UtilityClass Code Sample demonstrating the issue: Original code: import lombok.experimental.UtilityClass; @UtilityClass public final class Test { private int x; } Changed: public final class Test { private static int x; private Test() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } } Expected outcome: PMD should report a violation at line 4, but not. That's a false negative. Running PMD through: CLI Activity
MetadataMetadataAssigneesLabelsa:false-negativePMD doesn't flag a problematic piece of code TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |