Skip to content

Commit c7399ee

Browse files
author
Pankaj Agrawal
committed
Make util classes final
1 parent 8fb14e4 commit c7399ee

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

powertools-logging/src/main/java/software/amazon/lambda/powertools/logging/PowertoolsLogger.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
*
2323
* {@see PowertoolsLogging}
2424
*/
25-
public class PowertoolsLogger {
25+
public final class PowertoolsLogger {
26+
27+
private PowertoolsLogger() {
28+
}
2629

2730
/**
2831
* Appends an additional key and value to each log entry made. Duplicate values

powertools-sqs/src/main/java/software/amazon/lambda/powertools/sqs/PowertoolsSqs.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@
3131
* <p>
3232
* {@see PowertoolsLogging}
3333
*/
34-
public class PowertoolsSqs {
34+
public final class PowertoolsSqs {
3535

3636
private static final ObjectMapper objectMapper = new ObjectMapper();
3737

38+
private PowertoolsSqs() {
39+
}
40+
3841
/**
3942
* This is a utility method when you want to avoid using {@code LargeMessageHandler} annotation.
4043
* Gives you access to enriched messages from S3 in the SQS event produced via extended client lib.
@@ -77,7 +80,7 @@ public static <R> R enrichedMessageFromS3(final SQSEvent sqsEvent,
7780
return returnValue;
7881
}
7982

80-
private static SQSMessage clonedMessage(SQSMessage sqsMessage) {
83+
private static SQSMessage clonedMessage(final SQSMessage sqsMessage) {
8184
try {
8285
return objectMapper
8386
.readValue(objectMapper.writeValueAsString(sqsMessage), SQSMessage.class);

0 commit comments

Comments
 (0)