From 10c38baf09cb80eefcfe51c2663c7b66450964ac Mon Sep 17 00:00:00 2001 From: stevejagodzinski Date: Mon, 25 Oct 2021 03:19:29 -0400 Subject: [PATCH] When you synchronize on a field, it should be final --- src/test/java/HttpEventCollector_JavaLoggingTest.java | 4 ++-- src/test/java/HttpEventCollector_Log4j2Test.java | 4 ++-- src/test/java/HttpEventCollector_LogbackTest.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/HttpEventCollector_JavaLoggingTest.java b/src/test/java/HttpEventCollector_JavaLoggingTest.java index b450799f..6c9ba56e 100644 --- a/src/test/java/HttpEventCollector_JavaLoggingTest.java +++ b/src/test/java/HttpEventCollector_JavaLoggingTest.java @@ -30,8 +30,8 @@ public final class HttpEventCollector_JavaLoggingTest { private String httpEventCollectorName = "JavaLoggingTest"; - List> errors = new ArrayList<>(); - List logEx = new ArrayList<>(); + private final List> errors = new ArrayList<>(); + private final List logEx = new ArrayList<>(); /** * sending a message via httplogging using java.logging to splunk diff --git a/src/test/java/HttpEventCollector_Log4j2Test.java b/src/test/java/HttpEventCollector_Log4j2Test.java index 0ef9f2dc..1d4b16fa 100644 --- a/src/test/java/HttpEventCollector_Log4j2Test.java +++ b/src/test/java/HttpEventCollector_Log4j2Test.java @@ -30,8 +30,8 @@ public final class HttpEventCollector_Log4j2Test { private String httpEventCollectorName = "Log4j2Test"; - List> errors = new ArrayList<>(); - List logEx = new ArrayList<>(); + private final List> errors = new ArrayList<>(); + private final List logEx = new ArrayList<>(); /** * sending a message via httplogging using log4j2 to splunk diff --git a/src/test/java/HttpEventCollector_LogbackTest.java b/src/test/java/HttpEventCollector_LogbackTest.java index 92376ac6..96ca3c33 100644 --- a/src/test/java/HttpEventCollector_LogbackTest.java +++ b/src/test/java/HttpEventCollector_LogbackTest.java @@ -30,8 +30,8 @@ public final class HttpEventCollector_LogbackTest { private String httpEventCollectorName = "LogbackTest"; - List> errors = new ArrayList<>(); - List logEx = new ArrayList<>(); + private final List> errors = new ArrayList<>(); + private final List logEx = new ArrayList<>(); /** * sending a message via httplogging using logback to splunk