Skip to content

Commit

Permalink
dbeaver/pro#3407 Fix AbstractJdbcResultSet.getBigDecimal(int) to hand…
Browse files Browse the repository at this point in the history
…le empty strings (#52)

* dbeaver/pro#3407 Fix AbstractJdbcResultSet.getBigDecimal(int) to handle empty strings

Ensure `getBigDecimal(int)` checks for empty strings before processing to avoid potential errors.

* dbeaver/pro#3407 Cover FF CSV Driver by tests

---------

Co-authored-by: Ivan Gagarkin <[email protected]>
Co-authored-by: kseniaguzeeva <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2024
1 parent 9688078 commit 5fabad6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,11 @@ public Reader getCharacterStream(int columnIndex) throws SQLException {
@Override
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
final String value = getString(columnIndex);
return value != null ? new BigDecimal(value) : null;
if (value == null || value.isBlank()) {
return null;
}

return new BigDecimal(value);
}

@Override
Expand Down

0 comments on commit 5fabad6

Please sign in to comment.