From 925bc198c66a63280ee97eb1dcbb89d7ba6762b2 Mon Sep 17 00:00:00 2001 From: Aziem Chawdhary Date: Tue, 5 Mar 2024 16:42:32 +0000 Subject: [PATCH] Make EngineUrlStreamHandlerFactory safe wrt to changes in JDK15+ --- .../engine/shared/core/url/EngineUrlStreamHandlerFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/url/EngineUrlStreamHandlerFactory.java b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/url/EngineUrlStreamHandlerFactory.java index fedeef86777..efd6cb69b97 100644 --- a/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/url/EngineUrlStreamHandlerFactory.java +++ b/legend-engine-core/legend-engine-core-shared/legend-engine-shared-core/src/main/java/org/finos/legend/engine/shared/core/url/EngineUrlStreamHandlerFactory.java @@ -25,7 +25,7 @@ import java.util.List; import java.util.Map; import java.util.ServiceLoader; -import java.util.TreeMap; +import java.util.concurrent.ConcurrentHashMap; public class EngineUrlStreamHandlerFactory implements URLStreamHandlerFactory { @@ -60,7 +60,7 @@ public static synchronized void initialize() } } - private final Map handlers = new TreeMap<>(); + private final Map handlers = new ConcurrentHashMap<>(); @Override public URLStreamHandler createURLStreamHandler(String protocol)