Skip to content

PMD - pull_request #1507

PMD - pull_request

PMD - pull_request #1507

Status Success
Total duration 21s
Artifacts –

check-pmd.yml

on: pull_request
pmd_analyse
15s
pmd_analyse
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
This if statement can be replaced by `return !{condition};`: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L178
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
This statement should have braces: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L177
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
This statement should have braces: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L174
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
This statement should have braces: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L172
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
This statement should have braces: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L142
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
This statement should have braces: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L118
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
This statement should have braces: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L117
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
Unnecessary modifier 'final' on method 'isInitialized': the method is already in a final class: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L115
Fields in interfaces and annotations are automatically `public static final`, and methods are `public abstract`. Classes, interfaces or annotations nested in an interface or annotation are automatically `public static` (all nested interfaces and annotations are automatically static). Nested enums are automatically `static`. For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous. UnnecessaryModifier (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#unnecessarymodifier
Use of modifier volatile is not recommended.: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L65
Use of the keyword 'volatile' is generally used to fine tune a Java application, and therefore, requires a good expertise of the Java Memory Model. Moreover, its range of action is somewhat misknown. Therefore, the volatile keyword should not be used for maintenance purpose and portability. AvoidUsingVolatile (Priority: 1, Ruleset: Multithreading) https://docs.pmd-code.org/snapshot/pmd_rules_java_multithreading.html#avoidusingvolatile
Unnecessary modifier 'final' on method 'getDescriptor': the method is already in a final class: examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L35
Fields in interfaces and annotations are automatically `public static final`, and methods are `public abstract`. Classes, interfaces or annotations nested in an interface or annotation are automatically `public static` (all nested interfaces and annotations are automatically static). Nested enums are automatically `static`. For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous. UnnecessaryModifier (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#unnecessarymodifier
pmd_analyse
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
pmd_analyse
Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.