PMD Results
The following document contains the results of PMD 7.17.0.
Violations By Priority
Priority 3
org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–3793 |
| UnusedPrivateMethod | Avoid unused private methods such as 'isAnyJunit4(Artifact)'. | 1755 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 2845–2847 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 2879–2888 |
| UnusedPrivateField | Avoid unused private fields such as 'engine'. | 3001 |
org/apache/maven/plugin/surefire/StartupReportConfiguration.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–332 |
org/apache/maven/plugin/surefire/SurefireHelper.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–301 |
org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–189 |
org/apache/maven/plugin/surefire/booterclient/ForkNumberBucket.java
| Rule | Violation | Line |
|---|---|---|
| UnusedPrivateMethod | Avoid unused private methods such as 'getHighestDrawnNumber()'. | 77 |
org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–827 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 611–618 |
org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–245 |
org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStream.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–154 |
org/apache/maven/plugin/surefire/booterclient/output/ForkedProcessEventNotifier.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–209 |
org/apache/maven/plugin/surefire/booterclient/output/InPluginProcessDumpSingleton.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–95 |
org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
| Rule | Violation | Line |
|---|---|---|
| UselessPureMethodCall | Do not call pure method getStackTrace if the result is not used. | 97 |
org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
| Rule | Violation | Line |
|---|---|---|
| UnusedLocalVariable | Avoid unused local variables such as 'stream'. | 64 |
| UnusedLocalVariable | Avoid unused local variables such as 'c'. | 65 |
org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–281 |
| EmptyControlStatement | Empty try-with-resources statement. Rename the resource to `ignored`, `unused` or `_` (Java 22+). | 178–185 |
| UnusedLocalVariable | Avoid unused local variables such as 'c1'. | 178 |
| UnusedLocalVariable | Avoid unused local variables such as 'c2'. | 179 |
| UnusedLocalVariable | Avoid unused local variables such as 'c3'. | 180 |
org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–531 |
| UnusedPrivateMethod | Avoid unused private methods such as 'extractClassNameFromStackTrace(TestMethodStats)'. | 449 |
org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–789 |
org/apache/maven/plugin/surefire/report/Utf8RecodingDeferredFileOutputStream.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–224 |
org/apache/maven/surefire/stream/CommandEncoder.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–131 |
org/apache/maven/surefire/stream/EventDecoder.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–437 |
| UnusedPrivateField | Avoid unused private fields such as 'EVENT_WITH_RUNMODE_TID_AND_ONE_STRING'. | 94 |
Priority 4
org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'emptyList' is already in scope | 1801 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'emptyList' is already in scope | 2182 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'singletonList' is already in scope | 2197 |
| UselessParentheses | Useless parentheses around `isAnyJunit4(junitArtifact)`. | 3054 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'emptyList' is already in scope | 3077 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'StringUtils': 'isEmpty' is already in scope | 3127 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'StringUtils': 'isNotEmpty' is already in scope | 3128 |
org/apache/maven/plugin/surefire/StartupReportConfiguration.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `forkNumber == null`. | 222 |
org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `b & 0x0F`. | 105 |
org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Thread': 'currentThread' is already in scope | 78 |
org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.ERROR' | 49 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FAILURE' | 50 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FLAKE' | 51 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.SUCCESS' | 53 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR' | 55 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.FAILURE' | 56 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS' | 57 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file | 189 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file | 233 |
org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'ReportEntryType': 'SUCCESS' is already in scope because it is imported in this file | 173 |
org/apache/maven/plugin/surefire/report/TestSetRunListener.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `message.endsWith("\n") || message.endsWith("\r"...`. | 335 |
org/apache/maven/plugin/surefire/report/WrappedReportEntry.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `trimStackTrace ? w.writeTrimmedTraceToString() ...`. | 154 |
org/apache/maven/plugin/surefire/util/ScannerUtil.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `!FS.equals("/")`. | 35 |
| UselessParentheses | Useless parentheses around `IS_NON_UNIX_FS ? path.replace("/", FS) : path`. | 49 |
Files
org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–3793 |
| UnusedPrivateMethod | Avoid unused private methods such as 'isAnyJunit4(Artifact)'. | 3 | 1755 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'emptyList' is already in scope | 4 | 1801 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'emptyList' is already in scope | 4 | 2182 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'singletonList' is already in scope | 4 | 2197 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 2845–2847 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 2879–2888 |
| UnusedPrivateField | Avoid unused private fields such as 'engine'. | 3 | 3001 |
| UselessParentheses | Useless parentheses around `isAnyJunit4(junitArtifact)`. | 4 | 3054 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Collections': 'emptyList' is already in scope | 4 | 3077 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'StringUtils': 'isEmpty' is already in scope | 4 | 3127 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'StringUtils': 'isNotEmpty' is already in scope | 4 | 3128 |
org/apache/maven/plugin/surefire/StartupReportConfiguration.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–332 |
| UselessParentheses | Useless parentheses around `forkNumber == null`. | 4 | 222 |
org/apache/maven/plugin/surefire/SurefireHelper.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–301 |
org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–189 |
org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `b & 0x0F`. | 4 | 105 |
org/apache/maven/plugin/surefire/booterclient/ForkNumberBucket.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnusedPrivateMethod | Avoid unused private methods such as 'getHighestDrawnNumber()'. | 3 | 77 |
org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–827 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 611–618 |
org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–245 |
org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStream.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–154 |
org/apache/maven/plugin/surefire/booterclient/output/ForkedProcessEventNotifier.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–209 |
org/apache/maven/plugin/surefire/booterclient/output/InPluginProcessDumpSingleton.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–95 |
org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessPureMethodCall | Do not call pure method getStackTrace if the result is not used. | 3 | 97 |
org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnusedLocalVariable | Avoid unused local variables such as 'stream'. | 3 | 64 |
| UnusedLocalVariable | Avoid unused local variables such as 'c'. | 3 | 65 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Thread': 'currentThread' is already in scope | 4 | 78 |
org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–281 |
| EmptyControlStatement | Empty try-with-resources statement. Rename the resource to `ignored`, `unused` or `_` (Java 22+). | 3 | 178–185 |
| UnusedLocalVariable | Avoid unused local variables such as 'c1'. | 3 | 178 |
| UnusedLocalVariable | Avoid unused local variables such as 'c2'. | 3 | 179 |
| UnusedLocalVariable | Avoid unused local variables such as 'c3'. | 3 | 180 |
org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–531 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.ERROR' | 4 | 49 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FAILURE' | 4 | 50 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FLAKE' | 4 | 51 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.SUCCESS' | 4 | 53 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR' | 4 | 55 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.FAILURE' | 4 | 56 |
| UnnecessaryImport | Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS' | 4 | 57 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file | 4 | 189 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file | 4 | 233 |
| UnusedPrivateMethod | Avoid unused private methods such as 'extractClassNameFromStackTrace(TestMethodStats)'. | 3 | 449 |
org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–789 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'ReportEntryType': 'SUCCESS' is already in scope because it is imported in this file | 4 | 173 |
org/apache/maven/plugin/surefire/report/TestSetRunListener.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `message.endsWith("\n") || message.endsWith("\r"...`. | 4 | 335 |
org/apache/maven/plugin/surefire/report/Utf8RecodingDeferredFileOutputStream.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–224 |
org/apache/maven/plugin/surefire/report/WrappedReportEntry.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `trimStackTrace ? w.writeTrimmedTraceToString() ...`. | 4 | 154 |
org/apache/maven/plugin/surefire/util/ScannerUtil.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `!FS.equals("/")`. | 4 | 35 |
| UselessParentheses | Useless parentheses around `IS_NON_UNIX_FS ? path.replace("/", FS) : path`. | 4 | 49 |
org/apache/maven/surefire/stream/CommandEncoder.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–131 |
org/apache/maven/surefire/stream/EventDecoder.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–437 |
| UnusedPrivateField | Avoid unused private fields such as 'EVENT_WITH_RUNMODE_TID_AND_ONE_STRING'. | 3 | 94 |


