Skip to content

Commit

Permalink
reflect review feedback on exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
llama90 committed Jun 18, 2024
1 parent 4ea9178 commit 323c709
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,7 @@ public void testShouldGetBigDecimalMethodFromFloat4Vector() throws Exception {
(accessor, currentRow) -> {
float value = accessor.getFloat();
if (Float.isInfinite(value) || Float.isNaN(value)) {
assertThrows(
SQLException.class,
() -> {
throw new SQLException();
});
assertThrows(SQLException.class, accessor::getBigDecimal);
} else {
assertThat(accessor.getBigDecimal(), is(BigDecimal.valueOf(value)));
}
Expand All @@ -207,11 +203,7 @@ public void testShouldGetBigDecimalWithScaleMethodFromFloat4Vector() throws Exce
(accessor, currentRow) -> {
float value = accessor.getFloat();
if (Float.isInfinite(value) || Float.isNaN(value)) {
assertThrows(
SQLException.class,
() -> {
throw new SQLException();
});
assertThrows(SQLException.class, () -> accessor.getBigDecimal(9));
} else {
assertThat(
accessor.getBigDecimal(9),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ public void testShouldGetBigDecimalMethodFromFloat8Vector() throws Exception {
(accessor, currentRow) -> {
double value = accessor.getDouble();
if (Double.isInfinite(value) || Double.isNaN(value)) {
assertThrows(
SQLException.class,
() -> {
throw new SQLException();
});
assertThrows(SQLException.class, accessor::getBigDecimal);
} else {
assertThat(accessor.getBigDecimal(), is(BigDecimal.valueOf(value)));
}
Expand Down Expand Up @@ -186,11 +182,7 @@ public void testShouldGetBigDecimalWithScaleMethodFromFloat4Vector() throws Exce
(accessor, currentRow) -> {
double value = accessor.getDouble();
if (Double.isInfinite(value) || Double.isNaN(value)) {
assertThrows(
SQLException.class,
() -> {
throw new SQLException();
});
assertThrows(SQLException.class, () -> accessor.getBigDecimal(9));
} else {
assertThat(
accessor.getBigDecimal(9),
Expand Down

0 comments on commit 323c709

Please sign in to comment.