PMD - pull_request #1281
Annotations
1 error and 2 warnings
|
Ensure that resources like this ExecutorService object are closed after use:
powertools-lambda-metadata/src/test/java/software/amazon/lambda/powertools/metadata/LambdaMetadataClientConcurrencyTest.java#L57
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.
The property `allowedResourceMethodPatterns` can be used to specify method invocation patterns that return
resources which are managed externally and don't need to be closed by the caller. This is useful for
servlet-related streams like `HttpServletRequest.getReader()` or `HttpServletResponse.getWriter()`,
which are managed by the servlet container. The patterns use InvocationMatcher syntax
(e.g., `javax.servlet.ServletRequest#getReader()`).
CloseResource (Priority: 1, Ruleset: Error Prone)
https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#closeresource
|
|
pmd_analyse
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. 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.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
PMD Report
|
1.26 KB |
sha256:e4455fe388495cf0c60787bee34df0a38d81a072fc7c2c4b6adc0634f2c61c25
|
|