Skip to content

PMD - pull_request #353

PMD - pull_request

PMD - pull_request #353

Re-run triggered July 31, 2025 14:31
Status Success
Total duration 26s
Artifacts 1

check-pmd.yml

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

Annotations

5 errors
Avoid empty catch blocks: powertools-logging/powertools-logging-logback/src/test/java/software/amazon/lambda/powertools/logging/internal/LambdaJsonEncoderTest.java#L85
Empty Catch Block finds instances where an exception is caught, but nothing is done. In most circumstances, this swallows an exception which should either be acted on or reported. EmptyCatchBlock (Priority: 1, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#emptycatchblock
Avoid empty catch blocks: powertools-idempotency/powertools-idempotency-dynamodb/src/main/java/software/amazon/lambda/powertools/idempotency/persistence/dynamodb/DynamoDBPersistenceStore.java#L140
Empty Catch Block finds instances where an exception is caught, but nothing is done. In most circumstances, this swallows an exception which should either be acted on or reported. EmptyCatchBlock (Priority: 1, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#emptycatchblock
Use of modifier volatile is not recommended.: powertools-common/src/test/java/software/amazon/lambda/powertools/common/internal/ClassPreLoaderTest.java#L10
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
Avoid empty catch blocks: powertools-common/src/main/java/software/amazon/lambda/powertools/common/internal/ClassPreLoader.java#L87
Empty Catch Block finds instances where an exception is caught, but nothing is done. In most circumstances, this swallows an exception which should either be acted on or reported. EmptyCatchBlock (Priority: 1, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#emptycatchblock
Ensure that resources like this InputStream object are closed after use: powertools-common/src/main/java/software/amazon/lambda/powertools/common/internal/ClassPreLoader.java#L46
Ensure that resources (like `java.sql.Connection`, `java.sql.Statement`, and `java.sql.ResultSet` objects and any subtype of `java.lang.AutoCloseable`) are always closed after use. Failing to do so might result in resource leaks. Note: It suffices to configure the super type, e.g. `java.lang.AutoCloseable`, so that this rule automatically triggers on any subtype (e.g. `java.io.FileInputStream`). Additionally specifying `java.sql.Connection` helps in detecting the types, if the type resolution / auxclasspath is not correctly setup. Note: Since PMD 6.16.0 the default value for the property `types` contains `java.lang.AutoCloseable` and detects now cases where the standard `java.io.*Stream` classes are involved. In order to restore the old behaviour, just remove "AutoCloseable" from the types. CloseResource (Priority: 1, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#closeresource

Artifacts

Produced during runtime
Name Size Digest
PMD Report Expired
1.6 KB
sha256:5824a93c0ad67f3a95afe57b92533051fddce087c2fbf1e360664e96a8917db3