Skip to content

Commit 3b035d9

Browse files
committed
Fix pmd linting failures.
1 parent 4fcbf3c commit 3b035d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

powertools-metrics/src/test/java/software/amazon/lambda/powertools/metrics/internal/EmfMetricsLoggerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class EmfMetricsLoggerTest {
5151

5252
private Metrics metrics;
5353
private final ObjectMapper objectMapper = new ObjectMapper();
54-
private final PrintStream standardOut = System.out;
54+
private static final PrintStream standardOut = System.out;
5555
private final ByteArrayOutputStream outputStreamCaptor = new ByteArrayOutputStream();
5656

5757
@BeforeEach
@@ -180,7 +180,7 @@ void shouldAddDimension() throws Exception {
180180
JsonNode dimensions = rootNode.get("_aws").get("CloudWatchMetrics").get(0).get("Dimensions").get(0);
181181
boolean hasDimension = false;
182182
for (JsonNode dimension : dimensions) {
183-
if (dimension.asText().equals("CustomDimension")) {
183+
if ("CustomDimension".equals(dimension.asText())) {
184184
hasDimension = true;
185185
break;
186186
}
@@ -233,9 +233,9 @@ void shouldAddDimensionSet() throws Exception {
233233
boolean hasDim2 = false;
234234
for (JsonNode dimension : dimensions) {
235235
String dimName = dimension.asText();
236-
if (dimName.equals("Dim1")) {
236+
if ("Dim1".equals(dimName)) {
237237
hasDim1 = true;
238-
} else if (dimName.equals("Dim2")) {
238+
} else if ("Dim2".equals(dimName)) {
239239
hasDim2 = true;
240240
}
241241
}

0 commit comments

Comments
 (0)