Skip to content

Commit 6458c2b

Browse files
author
volker
committed
fix getBigDecimal(x) #1
1 parent a0cba43 commit 6458c2b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/com/inet/excel/ExcelResultSet.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 i-net software
2+
* Copyright 2023 - 2024 i-net software
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -511,7 +511,11 @@ public Reader getCharacterStream( String columnLabel ) throws SQLException {
511511
*/
512512
@Override
513513
public BigDecimal getBigDecimal( int columnIndex ) throws SQLException {
514-
return getValue( columnIndex );
514+
Object value = getValue( columnIndex );
515+
if( value == null ) {
516+
return null;
517+
}
518+
return new BigDecimal( value.toString() );
515519
}
516520

517521
/**

0 commit comments

Comments
 (0)