From 81ccd4bb05c4cbdb45ff80b87ed5cd49c40707da Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 6 Jan 2025 16:22:07 +0100 Subject: [PATCH] Fixes compilation with Java 24. See https://bugs.openjdk.org/browse/JDK-8347057. Signed-off-by: Simone Bordet --- .../main/java/org/eclipse/jetty/util/LockedPool.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/LockedPool.java b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/LockedPool.java index 40ff461df425..d117fed5ae6b 100644 --- a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/LockedPool.java +++ b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/LockedPool.java @@ -201,11 +201,6 @@ public interface Tracker @SuppressWarnings("unchecked") public static Tracker noTracker() { - class NoTracker implements Tracker - { - private static final Tracker INSTANCE = new NoTracker(); - } - return (Tracker)NoTracker.INSTANCE; } @@ -253,4 +248,9 @@ public default void terminated(Pool pool, Collection> entries) { } } + + private static class NoTracker implements Tracker + { + private static final Tracker INSTANCE = new NoTracker<>(); + } }