PMD - pull_request #1193
Annotations
5 errors and 1 warning
|
Run pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa:
powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/LambdaJsonEncoder.java#L128
Position literals first in all String comparisons, if the second argument is null then NullPointerExceptions
can be avoided, they will just return false. Note that switching literal positions for compareTo and
compareToIgnoreCase may change the result, see examples.
Note that compile-time constant strings are treated like literals. This is because they are inlined into
the class file, are necessarily non-null, and therefore cannot cause an NPE at runtime.
LiteralsFirstInComparisons (Priority: 1, Ruleset: Best Practices)
https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#literalsfirstincomparisons
|
|
Run pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa:
powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/LambdaJsonEncoder.java#L124
Excessive coupling to implementation types (e.g., `HashSet`) limits your ability to use alternate
implementations in the future as requirements change. Whenever available, declare variables
and parameters using a more general type (e.g, `Set`).
This rule reports uses of concrete collection types. User-defined types that should be treated
the same as interfaces can be configured with the property `allowedTypes`.
LooseCoupling (Priority: 1, Ruleset: Best Practices)
https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#loosecoupling
|
|
Run pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa:
powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/LambdaJsonEncoder.java#L81
Excessive coupling to implementation types (e.g., `HashSet`) limits your ability to use alternate
implementations in the future as requirements change. Whenever available, declare variables
and parameters using a more general type (e.g, `Set`).
This rule reports uses of concrete collection types. User-defined types that should be treated
the same as interfaces can be configured with the property `allowedTypes`.
LooseCoupling (Priority: 1, Ruleset: Best Practices)
https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#loosecoupling
|
|
Run pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa:
powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/JsonUtils.java#L119
Avoid unnecessary if-then-else statements when returning a boolean. The result of
the conditional test can be returned instead.
SimplifyBooleanReturns (Priority: 1, Ruleset: Design)
https://docs.pmd-code.org/snapshot/pmd_rules_java_design.html#simplifybooleanreturns
|
|
Run pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa:
powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/JsonUtils.java#L58
Excessive coupling to implementation types (e.g., `HashSet`) limits your ability to use alternate
implementations in the future as requirements change. Whenever available, declare variables
and parameters using a more general type (e.g, `Set`).
This rule reports uses of concrete collection types. User-defined types that should be treated
the same as interfaces can be configured with the property `allowedTypes`.
LooseCoupling (Priority: 1, Ruleset: Best Practices)
https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#loosecoupling
|
|
Post Setup Java
Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
|
Loading