diff --git a/src/main/java/com/firebolt/jdbc/type/BaseType.java b/src/main/java/com/firebolt/jdbc/type/BaseType.java index b461e0ec1..742c4c910 100644 --- a/src/main/java/com/firebolt/jdbc/type/BaseType.java +++ b/src/main/java/com/firebolt/jdbc/type/BaseType.java @@ -101,6 +101,13 @@ private static boolean isNegativeInf(String value) { return StringUtils.equals(value, "-inf"); } + private static String checkInfinity(String s) { + if (isPositiveInf(s) || isNegativeInf(s)) { + throw new IllegalArgumentException("Integer does not support infinity"); + } + return s; + } + public static boolean isNull(String value) { return StringUtils.equalsIgnoreCase(value, NULL_VALUE); } @@ -147,13 +154,6 @@ private T transform(StringToColumnTypeConversion conversion) throws SQLExcep return (T) transformFunction.apply(conversion); } - private static String checkInfinity(String s) { - if ("inf".equals(s) || "-inf".equals(s)) { - throw new IllegalArgumentException("Integer does not support infinity"); - } - return s; - } - @Builder @Value private static class StringToColumnTypeConversion {