Skip to content

PMD - pull_request #333

PMD - pull_request

PMD - pull_request #333

Re-run triggered July 29, 2025 10:44
Status Success
Total duration 25s
Artifacts 1

check-pmd.yml

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

Annotations

4 errors and 1 warning
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
This class has only private constructors and may be final: powertools-idempotency/powertools-idempotency-dynamodb/src/main/java/software/amazon/lambda/powertools/idempotency/persistence/dynamodb/DynamoDBPersistenceStore.java#L58
Reports classes that may be made final because they cannot be extended from outside their compilation unit anyway. This is because all their constructors are private, so a subclass could not call the super constructor. ClassWithOnlyPrivateConstructorsShouldBeFinal (Priority: 1, Ruleset: Design) https://docs.pmd-code.org/snapshot/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
Ensure that resources like this InputStream object are closed after use: powertools-common/src/main/java/software/amazon/lambda/powertools/common/internal/ClassPreLoader.java#L45
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
This class has only private constructors and may be final: powertools-common/src/main/java/software/amazon/lambda/powertools/common/internal/ClassPreLoader.java#L28
Reports classes that may be made final because they cannot be extended from outside their compilation unit anyway. This is because all their constructors are private, so a subclass could not call the super constructor. ClassWithOnlyPrivateConstructorsShouldBeFinal (Priority: 1, Ruleset: Design) https://docs.pmd-code.org/snapshot/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
pmd_analyse
Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.

Artifacts

Produced during runtime
Name Size Digest
PMD Report Expired
1.51 KB
sha256:b4ea197b948d4fe596a06627bccb749d7bf81411acbcbd2bb9c281ff719ab0f6