Skip to content

Commit 3a3ccff

Browse files
committed
Add PMD suppressions with reason where appropriate.
1 parent 54acdc2 commit 3a3ccff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

powertools-logging/src/main/java/software/amazon/lambda/powertools/logging/internal/LoggingManagerRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public final class LoggingManagerRegistry {
2929

3030
// Used with double-checked locking within getLoggingManger()
31-
@SuppressWarnings("java:S3077")
31+
@SuppressWarnings({ "java:S3077", "PMD.AvoidUsingVolatile" })
3232
private static volatile LoggingManager instance;
3333

3434
private LoggingManagerRegistry() {

powertools-logging/src/test/java/software/amazon/lambda/powertools/logging/internal/KeyBufferTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ void shouldUseCustomWarningLogger() {
333333
void shouldUseDefaultWarningLoggerWhenNotProvided() {
334334
// Capture System.err output
335335
ByteArrayOutputStream errCapture = new ByteArrayOutputStream();
336+
@SuppressWarnings("PMD.CloseResource") // System.err is not ours to close
336337
PrintStream originalErr = System.err;
337338
try (PrintStream newErr = new PrintStream(errCapture)) {
338339
System.setErr(newErr);

0 commit comments

Comments
 (0)