From 7c498f262e864244de8b780e62423970e6e5fc10 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 2 Dec 2018 21:26:52 +0100 Subject: [PATCH] [jdbc-driver] Synchronize access to the handlers map --- jdbc-driver/src/main/java/acolyte/jdbc/Driver.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jdbc-driver/src/main/java/acolyte/jdbc/Driver.java b/jdbc-driver/src/main/java/acolyte/jdbc/Driver.java index a946efaa..d2729c42 100644 --- a/jdbc-driver/src/main/java/acolyte/jdbc/Driver.java +++ b/jdbc-driver/src/main/java/acolyte/jdbc/Driver.java @@ -1,5 +1,7 @@ package acolyte.jdbc; +import java.util.Collections; +import java.util.Map; import java.util.Properties; import java.util.HashMap; @@ -31,8 +33,8 @@ public final class Driver implements java.sql.Driver { /** * Handler registry */ - public static final HashMap handlers = - new HashMap(); + public static final Map handlers = + Collections.synchronizedMap(new HashMap()); // --- Shared ---