Skip to content

Commit

Permalink
[jdbc-driver] Synchronize access to the handlers map
Browse files Browse the repository at this point in the history
  • Loading branch information
guilgaly committed Dec 2, 2018
1 parent 231155b commit 7c498f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jdbc-driver/src/main/java/acolyte/jdbc/Driver.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package acolyte.jdbc;

import java.util.Collections;
import java.util.Map;
import java.util.Properties;
import java.util.HashMap;

Expand Down Expand Up @@ -31,8 +33,8 @@ public final class Driver implements java.sql.Driver {
/**
* Handler registry
*/
public static final HashMap<String,ConnectionHandler> handlers =
new HashMap<String,ConnectionHandler>();
public static final Map<String,ConnectionHandler> handlers =
Collections.synchronizedMap(new HashMap<String,ConnectionHandler>());

// --- Shared ---

Expand Down

0 comments on commit 7c498f2

Please sign in to comment.