Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.7.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 193804
UnusedLocalVariable Avoid unused local variables such as 'actualFailIfNoTests'. 1771
CollapsibleIfStatements This if statement could be combined with its parent 28182820
CollapsibleIfStatements This if statement could be combined with its parent 28512865

org/apache/maven/plugin/surefire/StartupReportConfiguration.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19332

org/apache/maven/plugin/surefire/SurefireHelper.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19301

org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19196

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 19834
CollapsibleIfStatements This if statement could be combined with its parent 618625

org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19245

org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStream.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19154

org/apache/maven/plugin/surefire/booterclient/output/ForkedProcessEventNotifier.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19208

org/apache/maven/plugin/surefire/booterclient/output/InPluginProcessDumpSingleton.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 1995

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 19281
EmptyControlStatement Empty try-with-resources statement. Rename the resource to `ignored`, `unused` or `_` (Java 22+). 178185
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 19429

org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19713

org/apache/maven/plugin/surefire/report/Utf8RecodingDeferredFileOutputStream.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19224

org/apache/maven/surefire/stream/CommandEncoder.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19131

org/apache/maven/surefire/stream/EventDecoder.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 19435

Priority 4

org/apache/maven/plugin/surefire/AbstractSurefireMojo.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Collections': 'emptyList' is already in scope 1786
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Collections': 'emptyList' is already in scope 2151
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Collections': 'singletonList' is already in scope 2166

org/apache/maven/plugin/surefire/StartupReportConfiguration.java

Rule Violation Line
UselessParentheses Useless parentheses. 222

org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java

Rule Violation Line
UselessParentheses Useless parentheses. 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' 48
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FAILURE' 49
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FLAKE' 50
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.SUCCESS' 52
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR' 54
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.FAILURE' 55
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS' 56
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file 185
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file 229

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 172

org/apache/maven/plugin/surefire/report/TestSetRunListener.java

Rule Violation Line
UselessParentheses Useless parentheses. 335

org/apache/maven/plugin/surefire/report/WrappedReportEntry.java

Rule Violation Line
UselessParentheses Useless parentheses. 154

org/apache/maven/plugin/surefire/util/ScannerUtil.java

Rule Violation Line
UselessParentheses Useless parentheses. 35
UselessParentheses Useless parentheses. 49

Files

org/apache/maven/plugin/surefire/AbstractSurefireMojo.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 193804
UnusedLocalVariable Avoid unused local variables such as 'actualFailIfNoTests'. 3 1771
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Collections': 'emptyList' is already in scope 4 1786
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Collections': 'emptyList' is already in scope 4 2151
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Collections': 'singletonList' is already in scope 4 2166
CollapsibleIfStatements This if statement could be combined with its parent 3 28182820
CollapsibleIfStatements This if statement could be combined with its parent 3 28512865

org/apache/maven/plugin/surefire/StartupReportConfiguration.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19332
UselessParentheses Useless parentheses. 4 222

org/apache/maven/plugin/surefire/SurefireHelper.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19301

org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19196

org/apache/maven/plugin/surefire/booterclient/ChecksumCalculator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 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 19834
CollapsibleIfStatements This if statement could be combined with its parent 3 618625

org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19245

org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStream.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19154

org/apache/maven/plugin/surefire/booterclient/output/ForkedProcessEventNotifier.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19208

org/apache/maven/plugin/surefire/booterclient/output/InPluginProcessDumpSingleton.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 1995

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 19281
EmptyControlStatement Empty try-with-resources statement. Rename the resource to `ignored`, `unused` or `_` (Java 22+). 3 178185
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 19429
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.ERROR' 4 48
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FAILURE' 4 49
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.FLAKE' 4 50
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType.SUCCESS' 4 52
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR' 4 54
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.FAILURE' 4 55
UnnecessaryImport Unused static import 'org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS' 4 56
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file 4 185
UnnecessaryFullyQualifiedName Unnecessary qualifier 'TestResultType': 'FLAKE' is already in scope because it is imported in this file 4 229

org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19713
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ReportEntryType': 'SUCCESS' is already in scope because it is imported in this file 4 172

org/apache/maven/plugin/surefire/report/TestSetRunListener.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 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 19224

org/apache/maven/plugin/surefire/report/WrappedReportEntry.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 154

org/apache/maven/plugin/surefire/util/ScannerUtil.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 35
UselessParentheses Useless parentheses. 4 49

org/apache/maven/surefire/stream/CommandEncoder.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19131

org/apache/maven/surefire/stream/EventDecoder.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19435