Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed Sep 28, 2023
1 parent 00523d9 commit 122c023
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/com/firebolt/jdbc/type/BaseType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -147,13 +154,6 @@ private <T> 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 {
Expand Down

0 comments on commit 122c023

Please sign in to comment.