From 1936dd2fbec6adc7620b16edcb7355b066974db5 Mon Sep 17 00:00:00 2001 From: Mahied Maruf Date: Fri, 28 Nov 2025 01:54:57 +0000 Subject: [PATCH] Edit `FlupkeSystemLogger` method to lock The `null` check that just output the message was previously not using the lock, though I don't think it's a big issue and I'm not sure why there is a lock in the first place. I inherited that from Flupke, so it's better safe than sorry, though I'm pretty sure System.Logger makes those guarantees, but so does even `System.out`/`System.err`, so it's better to assume that ptrd had his reasons for locking here Signed-off-by: Mahied Maruf --- .../io/avaje/jex/http3/flupke/FlupkeSystemLogger.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/avaje-jex-http3-flupke/src/main/java/io/avaje/jex/http3/flupke/FlupkeSystemLogger.java b/avaje-jex-http3-flupke/src/main/java/io/avaje/jex/http3/flupke/FlupkeSystemLogger.java index f95bdf80..3d8c803e 100644 --- a/avaje-jex-http3-flupke/src/main/java/io/avaje/jex/http3/flupke/FlupkeSystemLogger.java +++ b/avaje-jex-http3-flupke/src/main/java/io/avaje/jex/http3/flupke/FlupkeSystemLogger.java @@ -26,13 +26,12 @@ protected void log(String text) { @Override protected void log(String text, Throwable throwable) { - if (throwable == null) { - LOG.log(Level.ERROR, text); - return; - } - this.lock.lock(); try { + if (throwable == null) { + LOG.log(Level.ERROR, text); + return; + } LOG.log(Level.ERROR, text, throwable); } finally { this.lock.unlock();