diff --git a/src/main/java/com/aws/greengrass/disk/spool/DiskSpoolDAO.java b/src/main/java/com/aws/greengrass/disk/spool/DiskSpoolDAO.java index aaad223..fdc99a2 100644 --- a/src/main/java/com/aws/greengrass/disk/spool/DiskSpoolDAO.java +++ b/src/main/java/com/aws/greengrass/disk/spool/DiskSpoolDAO.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantLock; @@ -107,7 +108,7 @@ public void initialize() throws SQLException { // eagerly create remaining statements for (CachedStatement statement : allStatements) { - if (statement == createSpoolerTable) { + if (Objects.equals(statement, createSpoolerTable)) { continue; } statement.replaceStatement(connection);