From 513fc4c686d359a79c1c34e6501ac57ced360eb8 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Fri, 6 Oct 2023 07:25:30 -0500 Subject: [PATCH] fix incorrect DhRepo closing --- .../com/seibel/distanthorizons/core/sql/AbstractDhRepo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/sql/AbstractDhRepo.java b/core/src/main/java/com/seibel/distanthorizons/core/sql/AbstractDhRepo.java index c0c42ddf4..f89c00d4f 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/sql/AbstractDhRepo.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/sql/AbstractDhRepo.java @@ -135,7 +135,7 @@ public abstract class AbstractDhRepo public Map queryDictionaryFirst(String sql) { List> objectList = this.query(sql); - return (objectList != null && !objectList.isEmpty()) ? objectList.get(0) : null; + return !objectList.isEmpty() ? objectList.get(0) : null; } /** note: this can only handle 1 command at a time */ @@ -207,7 +207,7 @@ public abstract class AbstractDhRepo { this.connection.close(); } - ACTIVE_CONNECTION_STRINGS_BY_REPO.remove(this.connectionString); + ACTIVE_CONNECTION_STRINGS_BY_REPO.remove(this); } } catch(SQLException e)