diff --git a/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/SqLiteDataType.java b/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/SqLiteDataType.java index 64eb5a7ec..9aba4ffcf 100644 --- a/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/SqLiteDataType.java +++ b/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/SqLiteDataType.java @@ -25,6 +25,7 @@ import androidx.annotation.NonNull; +import java.util.Locale; import java.util.Map; /** @@ -114,18 +115,17 @@ public SqLiteDataType[] newArray(final int size) { * We only lookup the more common types. * * @param typeName one of the {@link #MAP} keys - * Must be lower-case * * @throws IllegalArgumentException if the type name is unknown */ @NonNull static SqLiteDataType getInstance(@NonNull final String typeName) { - final SqLiteDataType type = MAP.get(typeName); + final SqLiteDataType type = MAP.get(typeName.toLowerCase(Locale.ENGLISH)); if (type != null) { return type; } - throw new IllegalArgumentException(typeName); + throw new IllegalArgumentException("No matching SqLiteDataType found for :" + typeName); } @NonNull diff --git a/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/TableInfo.java b/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/TableInfo.java index ddc2e9871..ef3f4d731 100644 --- a/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/TableInfo.java +++ b/core/src/main/java/com/hardbacknutter/nevertoomanybooks/core/database/TableInfo.java @@ -1,5 +1,5 @@ /* - * @Copyright 2018-2022 HardBackNutter + * @Copyright 2018-2023 HardBackNutter * @License GNU General Public License * * This file is part of NeverTooManyBooks. @@ -87,6 +87,8 @@ public ColumnInfo getColumn(@NonNull final String name) { * @param tableName Name of the database table to lookup * * @return A collection of ColumnInfo objects. + * + * @throws SQLiteException if we failed to get the column details */ @NonNull private Map describeTable(@NonNull final SQLiteDatabase db,