PMD Results
The following document contains the results of PMD 7.24.0.
Violations By Priority
Priority 3
org/apache/maven/cling/invoker/BaseParser.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–578 |
org/apache/maven/cling/invoker/LookupInvoker.java
| Rule | Violation | Line |
|---|---|---|
| SimplifiedTernary | This conditional expression can be simplified with || or && | 342 |
org/apache/maven/cling/invoker/mvnsh/builtin/BuiltinShellCommandRegistryFactory.java
| Rule | Violation | Line |
|---|---|---|
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 186 |
| UnusedFormalParameter | Avoid unused method parameters such as 'input'. | 190 |
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 211 |
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 249 |
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 267 |
org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–497 |
| UnusedNullCheckInEquals | Invoke equals() on the object you've already ensured is not null | 351 |
| UnusedFormalParameter | Avoid unused method parameters such as 'pomDocument'. | 456 |
org/apache/maven/cling/invoker/mvnup/goals/DomUtils.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–211 |
org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategy.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–629 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 279–283 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 315–318 |
org/apache/maven/cling/invoker/mvnup/goals/ModelUpgradeStrategy.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–402 |
| UnusedFormalParameter | Avoid unused method parameters such as 'currentVersion'. | 145 |
org/apache/maven/cling/invoker/mvnup/goals/ModelVersionUtils.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–258 |
org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategy.java
| Rule | Violation | Line |
|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 19–883 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 798–801 |
org/apache/maven/cling/invoker/mvnup/goals/StrategyOrchestrator.java
| Rule | Violation | Line |
|---|---|---|
| UnusedFormalParameter | Avoid unused method parameters such as 'strategy'. | 149 |
org/apache/maven/cling/props/MavenProperties.java
| Rule | Violation | Line |
|---|---|---|
| CollapsibleIfStatements | This if statement could be combined with its parent | 365–367 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 378–380 |
org/apache/maven/cling/transfer/ConsoleMavenTransferListener.java
| Rule | Violation | Line |
|---|---|---|
| UnusedFormalParameter | Avoid unused method parameters such as 'event'. | 139 |
org/apache/maven/cling/utils/CLIReportingUtils.java
| Rule | Violation | Line |
|---|---|---|
| UnusedPrivateField | Avoid unused private fields such as 'ONE_DAY'. | 48 |
Priority 4
org/apache/maven/cling/invoker/mvnenc/CommonsCliEncryptOptions.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Options': 'SOURCE_CLI' is already in scope because it is inherited by an enclosing type | 39 |
org/apache/maven/cling/invoker/mvnsh/CommonsCliShellOptions.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Options': 'SOURCE_CLI' is already in scope because it is inherited by an enclosing type | 33 |
org/apache/maven/cling/invoker/mvnup/CommonsCliUpgradeOptions.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Options': 'SOURCE_CLI' is already in scope because it is inherited by an enclosing type | 40 |
org/apache/maven/cling/invoker/mvnup/goals/AbstractUpgradeStrategy.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 177 |
org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 486 |
org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategy.java
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 440 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 592 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 607 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 621 |
org/apache/maven/cling/logging/Slf4jLoggerManager.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `null == hint ? getLoggerForComponent(role) : ne...`. | 53–55 |
org/apache/maven/cling/props/MavenPropertiesLoader.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `st.hasMoreTokens()`. | 124 |
| UselessParentheses | Useless parentheses around `tokStarted`. | 155 |
org/apache/maven/cling/transfer/AbstractMavenTransferListener.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `event.getRequestType() == RequestType.PUT ? "Up...`. | 72 |
org/apache/maven/cling/transfer/Slf4jMavenTransferListener.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `event.getRequestType() == RequestType.PUT ? "Up...`. | 75 |
org/apache/maven/cling/utils/CLIReportingUtils.java
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `version != null ? version : "<version unknown>"`. | 102 |
| UselessParentheses | Useless parentheses around `s != null ? (s.startsWith("${") && s.endsWith("...`. | 122 |
Files
org/apache/maven/cling/invoker/BaseParser.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–578 |
org/apache/maven/cling/invoker/LookupInvoker.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| SimplifiedTernary | This conditional expression can be simplified with || or && | 3 | 342 |
org/apache/maven/cling/invoker/mvnenc/CommonsCliEncryptOptions.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Options': 'SOURCE_CLI' is already in scope because it is inherited by an enclosing type | 4 | 39 |
org/apache/maven/cling/invoker/mvnsh/CommonsCliShellOptions.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Options': 'SOURCE_CLI' is already in scope because it is inherited by an enclosing type | 4 | 33 |
org/apache/maven/cling/invoker/mvnsh/builtin/BuiltinShellCommandRegistryFactory.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 3 | 186 |
| UnusedFormalParameter | Avoid unused method parameters such as 'input'. | 3 | 190 |
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 3 | 211 |
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 3 | 249 |
| UnusedFormalParameter | Avoid unused method parameters such as 'name'. | 3 | 267 |
org/apache/maven/cling/invoker/mvnup/CommonsCliUpgradeOptions.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Options': 'SOURCE_CLI' is already in scope because it is inherited by an enclosing type | 4 | 40 |
org/apache/maven/cling/invoker/mvnup/goals/AbstractUpgradeStrategy.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 4 | 177 |
org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–497 |
| UnusedNullCheckInEquals | Invoke equals() on the object you've already ensured is not null | 3 | 351 |
| UnusedFormalParameter | Avoid unused method parameters such as 'pomDocument'. | 3 | 456 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 4 | 486 |
org/apache/maven/cling/invoker/mvnup/goals/DomUtils.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–211 |
org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategy.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–629 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 279–283 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 315–318 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 4 | 440 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 4 | 592 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 4 | 607 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'AbstractUpgradeStrategy': 'extractArtifactCoordinatesWithParentResolution' is already in scope | 4 | 621 |
org/apache/maven/cling/invoker/mvnup/goals/ModelUpgradeStrategy.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–402 |
| UnusedFormalParameter | Avoid unused method parameters such as 'currentVersion'. | 3 | 145 |
org/apache/maven/cling/invoker/mvnup/goals/ModelVersionUtils.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–258 |
org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategy.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| TooManyStaticImports | Too many static imports may lead to messy code | 3 | 19–883 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 798–801 |
org/apache/maven/cling/invoker/mvnup/goals/StrategyOrchestrator.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnusedFormalParameter | Avoid unused method parameters such as 'strategy'. | 3 | 149 |
org/apache/maven/cling/logging/Slf4jLoggerManager.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `null == hint ? getLoggerForComponent(role) : ne...`. | 4 | 53–55 |
org/apache/maven/cling/props/MavenProperties.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 365–367 |
| CollapsibleIfStatements | This if statement could be combined with its parent | 3 | 378–380 |
org/apache/maven/cling/props/MavenPropertiesLoader.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `st.hasMoreTokens()`. | 4 | 124 |
| UselessParentheses | Useless parentheses around `tokStarted`. | 4 | 155 |
org/apache/maven/cling/transfer/AbstractMavenTransferListener.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `event.getRequestType() == RequestType.PUT ? "Up...`. | 4 | 72 |
org/apache/maven/cling/transfer/ConsoleMavenTransferListener.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnusedFormalParameter | Avoid unused method parameters such as 'event'. | 3 | 139 |
org/apache/maven/cling/transfer/Slf4jMavenTransferListener.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `event.getRequestType() == RequestType.PUT ? "Up...`. | 4 | 75 |
org/apache/maven/cling/utils/CLIReportingUtils.java
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnusedPrivateField | Avoid unused private fields such as 'ONE_DAY'. | 3 | 48 |
| UselessParentheses | Useless parentheses around `version != null ? version : "<version unknown>"`. | 4 | 102 |
| UselessParentheses | Useless parentheses around `s != null ? (s.startsWith("${") && s.endsWith("...`. | 4 | 122 |


