PMD Results

The following document contains the results of PMD 7.24.0.

Violations By Priority

Priority 3

org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 5759

org/apache/maven/artifact/handler/manager/LegacyArtifactHandlerManager.java

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 5254

org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'exclusions'. 37

org/apache/maven/bridge/MavenRepositorySystem.java

Rule Violation Line
AvoidUsingHardCodedIP Do not hard code the IP address ${variableName} 788

org/apache/maven/configuration/BasedirBeanConfigurationPathTranslator.java

Rule Violation Line
EmptyControlStatement Empty if statement 4654

org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java

Rule Violation Line
EmptyControlStatement Empty if statement 321346

org/apache/maven/internal/impl/DefaultLifecycleRegistry.java

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

org/apache/maven/internal/impl/DefaultTypeRegistry.java

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 6668

org/apache/maven/internal/transformation/impl/ConsumerPomArtifactTransformer.java

Rule Violation Line
UnusedPrivateMethod Avoid unused private methods such as 'doDeleteFiles()'. 158

org/apache/maven/internal/transformation/impl/DefaultConsumerPomBuilder.java

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'dep2'. 283

org/apache/maven/internal/transformation/impl/TransformedArtifact.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'SHA1_BUFFER_SIZE'. 49

org/apache/maven/lifecycle/internal/MojoExecutor.java

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'lock'. 307

org/apache/maven/lifecycle/internal/builder/BuilderCommon.java

Rule Violation Line
EmptyControlStatement Empty if statement 188198

org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java

Rule Violation Line
TooManyStaticImports Too many static imports may lead to messy code 191134
UnusedLocalVariable Avoid unused local variables such as 'phase'. 335
CollapsibleIfStatements This if statement could be combined with its parent 380398
EmptyControlStatement Empty if statement 780790

org/apache/maven/plugin/PluginConfigurationException.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'pluginDescriptor'. 29
UnusedPrivateField Avoid unused private fields such as 'originalMessage'. 31

org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Rule Violation Line
EmptyControlStatement Empty if statement 350358

org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 182189
EmptyControlStatement Empty if statement 230241

org/apache/maven/project/MavenProject.java

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'scope'. 512
UnusedPrivateMethod Avoid unused private methods such as 'toResource(SourceRoot)'. 825
CollapsibleIfStatements This if statement could be combined with its parent 16371639
CollapsibleIfStatements This if statement could be combined with its parent 17641769
CollapsibleIfStatements This if statement could be combined with its parent 17831785

Priority 4

org/apache/maven/ReactorReader.java

Rule Violation Line
UselessParentheses Useless parentheses around `"test-jar".equals(artifact.getProperty("type", ...`. 328

org/apache/maven/bridge/MavenRepositorySystem.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenRepositorySystem': 'DEFAULT_REMOTE_REPO_URL' is already in scope because it is declared in an enclosing type 557
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenRepositorySystem': 'DEFAULT_REMOTE_REPO_ID' is already in scope because it is declared in an enclosing type 558
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenRepositorySystem': 'DEFAULT_LOCAL_REPO_ID' is already in scope because it is declared in an enclosing type 681
UselessParentheses Useless parentheses around `mirrorLayout == null || mirrorLayout.isEmpty()`. 827

org/apache/maven/exception/DefaultExceptionHandler.java

Rule Violation Line
UselessParentheses Useless parentheses around `reference != null && !reference.isEmpty()`. 210
UselessParentheses Useless parentheses around `exceptionMessage == null || exceptionMessage.is...`. 245

org/apache/maven/graph/DefaultGraphBuilder.java

Rule Violation Line
UselessParentheses Useless parentheses around `makeBehavior != null && !makeBehavior.isEmpty()`. 274

org/apache/maven/internal/impl/DefaultLifecycleRegistry.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.api': 'Lifecycle' is already in scope because it is imported in this file 152
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lifecycle': 'CLEAN' is already in scope because it is inherited by an enclosing type 365
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lifecycle': 'DEFAULT' is already in scope because it is inherited by an enclosing type 388
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lifecycle': 'SITE' is already in scope because it is inherited by an enclosing type 482

org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java

Rule Violation Line
UselessParentheses Useless parentheses around `(parameterForImplementation != null) && !parame...`. 317

org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java

Rule Violation Line
UselessParentheses Useless parentheses around `rootProject.getDefaultGoal() != null && !rootPr...`. 8384

org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java

Rule Violation Line
UselessParentheses Useless parentheses around `(parameterForImplementation != null) && !parame...`. 1053

org/apache/maven/lifecycle/internal/concurrent/ConcurrentLifecycleStarter.java

Rule Violation Line
UselessParentheses Useless parentheses around `rootProject.getDefaultGoal() != null && !rootPr...`. 128129

org/apache/maven/logging/LoggingExecutionListener.java

Rule Violation Line
UselessParentheses Useless parentheses around `t instanceof RuntimeException || !(t instanceof...`. 64

org/apache/maven/plugin/PluginParameterException.java

Rule Violation Line
UselessParentheses Useless parentheses around `alias != null && !alias.isEmpty()`. 125

org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Rule Violation Line
UselessParentheses Useless parentheses around `(project != null) && (project.getProperties() !...`. 307
UselessParentheses Useless parentheses around `(type.isPrimitive() || type.getName().startsWit...`. 334335

org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java

Rule Violation Line
UselessParentheses Useless parentheses around `(type.isPrimitive() || type.getName().startsWit...`. 214215

org/apache/maven/plugin/internal/DefaultLegacySupport.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 45
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 51
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 53
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 59

org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java

Rule Violation Line
UselessParentheses Useless parentheses around `result.getRepository() != null ? result.getRepo...`. 134

org/apache/maven/project/DefaultProjectBuilder.java

Rule Violation Line
UselessParentheses Useless parentheses around `parent ? RequestType.CONSUMER_PARENT : RequestT...`. 390392
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.api.model': 'Profile' is already in scope because it is imported in this file 790
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.api.model': 'Profile' is already in scope because it is imported in this file 799

org/apache/maven/project/MavenProject.java

Rule Violation Line
UselessParentheses Useless parentheses around `executionProject == null ? this : executionProject`. 1135
UselessParentheses Useless parentheses around `project.getParentArtifact()`. 1370
UselessParentheses Useless parentheses around `Collections.unmodifiableList(project.getActiveP...`. 1381

org/apache/maven/project/ProjectSorter.java

Rule Violation Line
UselessParentheses Useless parentheses around `version == null || version.isEmpty()`. 244

org/apache/maven/project/collector/DefaultProjectsSelector.java

Rule Violation Line
UselessParentheses Useless parentheses around `(loc != null && !loc.isEmpty()) ? " @ " + loc : ""`. 83

Files

org/apache/maven/ReactorReader.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `"test-jar".equals(artifact.getProperty("type", ...`. 4 328

org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 5759

org/apache/maven/artifact/handler/manager/LegacyArtifactHandlerManager.java

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 5254

org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'exclusions'. 3 37

org/apache/maven/bridge/MavenRepositorySystem.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenRepositorySystem': 'DEFAULT_REMOTE_REPO_URL' is already in scope because it is declared in an enclosing type 4 557
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenRepositorySystem': 'DEFAULT_REMOTE_REPO_ID' is already in scope because it is declared in an enclosing type 4 558
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenRepositorySystem': 'DEFAULT_LOCAL_REPO_ID' is already in scope because it is declared in an enclosing type 4 681
AvoidUsingHardCodedIP Do not hard code the IP address ${variableName} 3 788
UselessParentheses Useless parentheses around `mirrorLayout == null || mirrorLayout.isEmpty()`. 4 827

org/apache/maven/configuration/BasedirBeanConfigurationPathTranslator.java

Rule Violation Priority Line
EmptyControlStatement Empty if statement 3 4654

org/apache/maven/exception/DefaultExceptionHandler.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `reference != null && !reference.isEmpty()`. 4 210
UselessParentheses Useless parentheses around `exceptionMessage == null || exceptionMessage.is...`. 4 245

org/apache/maven/graph/DefaultGraphBuilder.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `makeBehavior != null && !makeBehavior.isEmpty()`. 4 274

org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java

Rule Violation Priority Line
EmptyControlStatement Empty if statement 3 321346

org/apache/maven/internal/impl/DefaultLifecycleRegistry.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 19502
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.api': 'Lifecycle' is already in scope because it is imported in this file 4 152
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lifecycle': 'CLEAN' is already in scope because it is inherited by an enclosing type 4 365
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lifecycle': 'DEFAULT' is already in scope because it is inherited by an enclosing type 4 388
UnnecessaryFullyQualifiedName Unnecessary qualifier 'Lifecycle': 'SITE' is already in scope because it is inherited by an enclosing type 4 482

org/apache/maven/internal/impl/DefaultTypeRegistry.java

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 6668

org/apache/maven/internal/transformation/impl/ConsumerPomArtifactTransformer.java

Rule Violation Priority Line
UnusedPrivateMethod Avoid unused private methods such as 'doDeleteFiles()'. 3 158

org/apache/maven/internal/transformation/impl/DefaultConsumerPomBuilder.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'dep2'. 3 283

org/apache/maven/internal/transformation/impl/TransformedArtifact.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'SHA1_BUFFER_SIZE'. 3 49

org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `(parameterForImplementation != null) && !parame...`. 4 317

org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `rootProject.getDefaultGoal() != null && !rootPr...`. 4 8384

org/apache/maven/lifecycle/internal/MojoExecutor.java

Rule Violation Priority Line
UnusedLocalVariable Avoid unused local variables such as 'lock'. 3 307

org/apache/maven/lifecycle/internal/builder/BuilderCommon.java

Rule Violation Priority Line
EmptyControlStatement Empty if statement 3 188198

org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java

Rule Violation Priority Line
TooManyStaticImports Too many static imports may lead to messy code 3 191134
UnusedLocalVariable Avoid unused local variables such as 'phase'. 3 335
CollapsibleIfStatements This if statement could be combined with its parent 3 380398
EmptyControlStatement Empty if statement 3 780790
UselessParentheses Useless parentheses around `(parameterForImplementation != null) && !parame...`. 4 1053

org/apache/maven/lifecycle/internal/concurrent/ConcurrentLifecycleStarter.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `rootProject.getDefaultGoal() != null && !rootPr...`. 4 128129

org/apache/maven/logging/LoggingExecutionListener.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `t instanceof RuntimeException || !(t instanceof...`. 4 64

org/apache/maven/plugin/PluginConfigurationException.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'pluginDescriptor'. 3 29
UnusedPrivateField Avoid unused private fields such as 'originalMessage'. 3 31

org/apache/maven/plugin/PluginParameterException.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `alias != null && !alias.isEmpty()`. 4 125

org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `(project != null) && (project.getProperties() !...`. 4 307
UselessParentheses Useless parentheses around `(type.isPrimitive() || type.getName().startsWit...`. 4 334335
EmptyControlStatement Empty if statement 3 350358

org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 182189
UselessParentheses Useless parentheses around `(type.isPrimitive() || type.getName().startsWit...`. 4 214215
EmptyControlStatement Empty if statement 3 230241

org/apache/maven/plugin/internal/DefaultLegacySupport.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 4 45
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 4 51
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 4 53
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DefaultLegacySupport': 'SESSION' is already in scope because it is declared in an enclosing type 4 59

org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `result.getRepository() != null ? result.getRepo...`. 4 134

org/apache/maven/project/DefaultProjectBuilder.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `parent ? RequestType.CONSUMER_PARENT : RequestT...`. 4 390392
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.api.model': 'Profile' is already in scope because it is imported in this file 4 790
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.api.model': 'Profile' is already in scope because it is imported in this file 4 799

org/apache/maven/project/MavenProject.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'scope'. 3 512
UnusedPrivateMethod Avoid unused private methods such as 'toResource(SourceRoot)'. 3 825
UselessParentheses Useless parentheses around `executionProject == null ? this : executionProject`. 4 1135
UselessParentheses Useless parentheses around `project.getParentArtifact()`. 4 1370
UselessParentheses Useless parentheses around `Collections.unmodifiableList(project.getActiveP...`. 4 1381
CollapsibleIfStatements This if statement could be combined with its parent 3 16371639
CollapsibleIfStatements This if statement could be combined with its parent 3 17641769
CollapsibleIfStatements This if statement could be combined with its parent 3 17831785

org/apache/maven/project/ProjectSorter.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `version == null || version.isEmpty()`. 4 244

org/apache/maven/project/collector/DefaultProjectsSelector.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `(loc != null && !loc.isEmpty()) ? " @ " + loc : ""`. 4 83