diff --git a/core/src/main/java/com/seibel/distanthorizons/core/sql/DbConnectionClosedException.java b/core/src/main/java/com/seibel/distanthorizons/core/sql/DbConnectionClosedException.java index d27a40071..d6155a7c9 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/sql/DbConnectionClosedException.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/sql/DbConnectionClosedException.java @@ -16,7 +16,7 @@ public class DbConnectionClosedException extends SQLException // helper methods // - public static boolean IsClosedException(SQLException e) + public static boolean isClosedException(SQLException e) { // TODO long term we should prevent using repos that are closed, but for now this is the easier solution String message = e.getMessage().toLowerCase(); diff --git a/core/src/main/java/com/seibel/distanthorizons/core/sql/repo/AbstractDhRepo.java b/core/src/main/java/com/seibel/distanthorizons/core/sql/repo/AbstractDhRepo.java index 3a24fd33a..8cc6dd76e 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/sql/repo/AbstractDhRepo.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/sql/repo/AbstractDhRepo.java @@ -25,11 +25,9 @@ import com.seibel.distanthorizons.core.sql.DbConnectionClosedException; import com.seibel.distanthorizons.core.sql.dto.IBaseDTO; import com.seibel.distanthorizons.core.util.KeyedLockContainer; import com.seibel.distanthorizons.core.util.ThreadUtil; -import com.seibel.distanthorizons.core.util.threading.ThreadPoolUtil; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; -import javax.swing.plaf.nimbus.State; import java.io.File; import java.io.IOException; import java.sql.*; @@ -190,7 +188,7 @@ public abstract class AbstractDhRepo> implemen catch (SQLException | IOException e) { if (e instanceof SQLException - && DbConnectionClosedException.IsClosedException((SQLException)e)) + && DbConnectionClosedException.isClosedException((SQLException)e)) { //LOGGER.warn("Attempted to get ["+this.dtoClass.getSimpleName()+"] with primary key ["+primaryKey+"] on closed repo ["+this.connectionString+"]."); } @@ -368,7 +366,7 @@ public abstract class AbstractDhRepo> implemen // SQL exceptions generally only happen when something is wrong with // the database or the query and should cause the system to blow up to notify the developer - if (DbConnectionClosedException.IsClosedException(e)) + if (DbConnectionClosedException.isClosedException(e)) { throw new DbConnectionClosedException(e); } @@ -419,7 +417,7 @@ public abstract class AbstractDhRepo> implemen // SQL exceptions generally only happen when something is wrong with // the database or the query and should cause the system to blow up to notify the developer - if (DbConnectionClosedException.IsClosedException(e)) + if (DbConnectionClosedException.isClosedException(e)) { return null; } @@ -449,7 +447,7 @@ public abstract class AbstractDhRepo> implemen } catch(SQLException e) { - if (DbConnectionClosedException.IsClosedException(e)) + if (DbConnectionClosedException.isClosedException(e)) { return null; }