You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2026/07/20 08:22:08 UTC
(struts) 03/06: WW-5620 Migrate FinalizableReferenceQueue to Log4j2
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch WW-5620-log4j2-logging-standardization
in repository https://gitbox.apache.org/repos/asf/struts.git
commit 378b500e8d8a452d233e2dbf35273f04e9b4322c
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon Jul 20 10:02:52 2026 +0200
WW-5620 Migrate FinalizableReferenceQueue to Log4j2
Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
---
.../apache/struts2/inject/util/FinalizableReferenceQueue.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java b/core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java
index 07b7ececa..47027392b 100644
--- a/core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java
+++ b/core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java
@@ -19,8 +19,8 @@ package org.apache.struts2.inject.util;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.util.concurrent.atomic.AtomicReference;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
/**
* Starts a background thread that cleans up after reclaimed referents.
@@ -29,8 +29,7 @@ import java.util.logging.Logger;
*/
public class FinalizableReferenceQueue extends ReferenceQueue<Object> {
- private static final Logger logger =
- Logger.getLogger(FinalizableReferenceQueue.class.getName());
+ private static final Logger LOG = LogManager.getLogger(FinalizableReferenceQueue.class);
private final AtomicReference<Thread> cleanupThread = new AtomicReference<>();
@@ -45,7 +44,7 @@ public class FinalizableReferenceQueue extends ReferenceQueue<Object> {
}
void deliverBadNews(Throwable t) {
- logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
+ LOG.error("Error cleaning up after reference.", t);
}
void start() {