PMD Results

The following document contains the results of PMD 7.0.0.

Violations By Priority

Priority 3

org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
Rule Violation Line
EmptyControlStatement Empty if statement 109114
org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
Rule Violation Line
EmptyControlStatement Empty if statement 8893
org/apache/maven/artifact/repository/DefaultArtifactRepository.java
Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'uniqueVersion'. 73
org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 124132
CollapsibleIfStatements This if statement could be combined with its parent 363371
org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
Rule Violation Line
AvoidThreadGroup Avoid using java.lang.ThreadGroup; it is not thread safe 539
org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java
Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'envars'. 42
org/apache/maven/project/path/DefaultPathTranslator.java
Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 142144
org/apache/maven/repository/DefaultMirrorSelector.java
Rule Violation Line
AvoidUsingHardCodedIP Do not hard code the IP address ${variableName} 139
org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java
Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'lock'. 306
org/apache/maven/repository/legacy/DefaultWagonManager.java
Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'protocol'. 675
org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 176183
org/apache/maven/repository/metadata/ArtifactMetadata.java
Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'af'. 172
org/apache/maven/repository/metadata/DefaultGraphConflictResolver.java
Rule Violation Line
EmptyControlStatement Empty else statement 97103
UnusedFormalParameter Avoid unused method parameters such as 'v'. 189
org/apache/maven/repository/metadata/MetadataGraph.java
Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'nVertices'. 218
org/apache/maven/repository/metadata/MetadataGraphEdge.java
Rule Violation Line
OverrideBothEqualsAndHashcode Ensure you override both equals() and hashCode() 79

Priority 4

org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java
Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.artifact.metadata': 'ArtifactMetadata' is already in scope because it is declared in the same package 29
org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java
Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositoryMetadata': 'RELEASE_OR_SNAPSHOT' is already in scope because it is inherited by an enclosing type 178
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositoryMetadata': 'RELEASE_OR_SNAPSHOT' is already in scope because it is inherited by an enclosing type 178
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositoryMetadata': 'SNAPSHOT' is already in scope because it is inherited by an enclosing type 182
org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
Rule Violation Line
UselessParentheses Useless parentheses. 280
UselessParentheses Useless parentheses. 282
org/apache/maven/repository/DefaultMirrorSelector.java
Rule Violation Line
UselessParentheses Useless parentheses. 178
org/apache/maven/repository/legacy/LegacyRepositorySystem.java
Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'defaultUserLocalRepository' is already in scope because it is inherited by an enclosing type 237
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'DEFAULT_LOCAL_REPO_ID' is already in scope because it is inherited by an enclosing type 243
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'DEFAULT_REMOTE_REPO_URL' is already in scope because it is inherited by an enclosing type 253
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'DEFAULT_REMOTE_REPO_ID' is already in scope because it is inherited by an enclosing type 254
org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java
Rule Violation Line
UselessParentheses Useless parentheses. 138139
org/apache/maven/repository/metadata/MetadataGraphEdge.java
Rule Violation Line
UselessParentheses Useless parentheses. 160
UselessParentheses Useless parentheses. 161
org/apache/maven/settings/DefaultMavenSettingsBuilder.java
Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenSettingsBuilder': 'ALT_USER_SETTINGS_XML_LOCATION' is already in scope because it is inherited by an enclosing type 53
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenSettingsBuilder': 'ALT_GLOBAL_SETTINGS_XML_LOCATION' is already in scope because it is inherited by an enclosing type 64

Files

org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java

Rule Violation Priority Line
EmptyControlStatement Empty if statement 3 109114

org/apache/maven/artifact/installer/DefaultArtifactInstaller.java

Rule Violation Priority Line
EmptyControlStatement Empty if statement 3 8893

org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'org.apache.maven.artifact.metadata': 'ArtifactMetadata' is already in scope because it is declared in the same package 4 29

org/apache/maven/artifact/repository/DefaultArtifactRepository.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'uniqueVersion'. 3 73

org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositoryMetadata': 'RELEASE_OR_SNAPSHOT' is already in scope because it is inherited by an enclosing type 4 178
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositoryMetadata': 'RELEASE_OR_SNAPSHOT' is already in scope because it is inherited by an enclosing type 4 178
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositoryMetadata': 'SNAPSHOT' is already in scope because it is inherited by an enclosing type 4 182

org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java

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

org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

Rule Violation Priority Line
AvoidThreadGroup Avoid using java.lang.ThreadGroup; it is not thread safe 3 539

org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 280
UselessParentheses Useless parentheses. 4 282

org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'envars'. 3 42

org/apache/maven/project/path/DefaultPathTranslator.java

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

org/apache/maven/repository/DefaultMirrorSelector.java

Rule Violation Priority Line
AvoidUsingHardCodedIP Do not hard code the IP address ${variableName} 3 139
UselessParentheses Useless parentheses. 4 178

org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java

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

org/apache/maven/repository/legacy/DefaultWagonManager.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'protocol'. 3 675

org/apache/maven/repository/legacy/LegacyRepositorySystem.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'defaultUserLocalRepository' is already in scope because it is inherited by an enclosing type 4 237
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'DEFAULT_LOCAL_REPO_ID' is already in scope because it is inherited by an enclosing type 4 243
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'DEFAULT_REMOTE_REPO_URL' is already in scope because it is inherited by an enclosing type 4 253
UnnecessaryFullyQualifiedName Unnecessary qualifier 'RepositorySystem': 'DEFAULT_REMOTE_REPO_ID' is already in scope because it is inherited by an enclosing type 4 254

org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java

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

org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 138139

org/apache/maven/repository/metadata/ArtifactMetadata.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'af'. 3 172

org/apache/maven/repository/metadata/DefaultGraphConflictResolver.java

Rule Violation Priority Line
EmptyControlStatement Empty else statement 3 97103
UnusedFormalParameter Avoid unused method parameters such as 'v'. 3 189

org/apache/maven/repository/metadata/MetadataGraph.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'nVertices'. 3 218

org/apache/maven/repository/metadata/MetadataGraphEdge.java

Rule Violation Priority Line
OverrideBothEqualsAndHashcode Ensure you override both equals() and hashCode() 3 79
UselessParentheses Useless parentheses. 4 160
UselessParentheses Useless parentheses. 4 161

org/apache/maven/settings/DefaultMavenSettingsBuilder.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenSettingsBuilder': 'ALT_USER_SETTINGS_XML_LOCATION' is already in scope because it is inherited by an enclosing type 4 53
UnnecessaryFullyQualifiedName Unnecessary qualifier 'MavenSettingsBuilder': 'ALT_GLOBAL_SETTINGS_XML_LOCATION' is already in scope because it is inherited by an enclosing type 4 64