From bf14b84beb8bf1ce35acc2c7c5d4bfd35ac8c938 Mon Sep 17 00:00:00 2001 From: DallinFromEarth <112426674+DallinFromEarth@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:12:16 -0700 Subject: [PATCH] add Instant default for config --- .../java/edu/byu/cs/dataAccess/sql/ConfigurationSqlDao.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/edu/byu/cs/dataAccess/sql/ConfigurationSqlDao.java b/src/main/java/edu/byu/cs/dataAccess/sql/ConfigurationSqlDao.java index 822bced4..8b22e12a 100644 --- a/src/main/java/edu/byu/cs/dataAccess/sql/ConfigurationSqlDao.java +++ b/src/main/java/edu/byu/cs/dataAccess/sql/ConfigurationSqlDao.java @@ -68,6 +68,8 @@ private T getValue(String value, Class type) { return type.cast(0); } else if (type == Boolean.class) { return type.cast(false); + } else if (type == Instant.class) { + return type.cast(Instant.MAX); } else { throw new IllegalArgumentException("Unsupported configuration type: " + type); }