Skip to content

Commit

Permalink
Use ConcurrentHashMap in JdbcConnectionsPool
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr authored and wendigo committed Aug 18, 2023
1 parent 43f4301 commit ac194da
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import static com.google.common.collect.Maps.newHashMap;
import static io.trino.tempto.internal.query.JdbcUtils.dataSource;
import static java.util.Objects.requireNonNull;

public class JdbcConnectionsPool
{
private final Map<JdbcConnectivityParamsState, DataSource> dataSources = newHashMap();
private final Map<JdbcConnectivityParamsState, DataSource> dataSources = new ConcurrentHashMap<>();

public Connection connectionFor(JdbcConnectivityParamsState jdbcParamsState)
throws SQLException
Expand Down

0 comments on commit ac194da

Please sign in to comment.