fix isClosedException name

This commit is contained in:
James Seibel
2025-01-21 07:07:33 -06:00
parent ebd00df388
commit 363ec76450
2 changed files with 5 additions and 7 deletions
@@ -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();
@@ -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<TKey, TDTO extends IBaseDTO<TKey>> 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<TKey, TDTO extends IBaseDTO<TKey>> 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<TKey, TDTO extends IBaseDTO<TKey>> 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<TKey, TDTO extends IBaseDTO<TKey>> implemen
}
catch(SQLException e)
{
if (DbConnectionClosedException.IsClosedException(e))
if (DbConnectionClosedException.isClosedException(e))
{
return null;
}