diff --git a/src/main/java/com/laytonsmith/persistence/DataSourceFactory.java b/src/main/java/com/laytonsmith/persistence/DataSourceFactory.java index 72887b1c8..d3636e2c4 100644 --- a/src/main/java/com/laytonsmith/persistence/DataSourceFactory.java +++ b/src/main/java/com/laytonsmith/persistence/DataSourceFactory.java @@ -53,7 +53,8 @@ private static void init() { public static DataSource GetDataSource(URI uri, ConnectionMixinFactory.ConnectionMixinOptions options) throws DataSourceException { init(); - DataSource source = DATA_SOURCE_POOL.get(uri); + URI uriKey = uri; + DataSource source = DATA_SOURCE_POOL.get(uriKey); if(source != null) { return source; } @@ -91,7 +92,7 @@ public static DataSource GetDataSource(URI uri, ConnectionMixinFactory.Connectio if(!ds.getModifiers().contains(DataSource.DataSourceModifier.TRANSIENT)) { ds.populate(); } - DATA_SOURCE_POOL.put(uri, ds); + DATA_SOURCE_POOL.put(uriKey, ds); return ds; } catch (InvocationTargetException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | DataSourceException ex) {