[CONJ-429] ResultSet.getDouble/getFloat may throws a NumberFormatException Created: 2017-02-10 Updated: 2017-03-13 Resolved: 2017-03-08 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.5.8 |
| Fix Version/s: | 1.5.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Julien Stegle | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
JDK 1.8.0.25 |
||
| Attachments: |
|
| Description |
|
I've recently encountered an issue using the getDouble method of the driver's resultset. The document seems to indicate that this kind of behavior should always throws an SQLException (which is catched in our app). I'll join the anonymized stacktrace to this issue. |
| Comments |
| Comment by Julien Stegle [ 2017-03-07 ] |
|
Hi, I was wondering I you could confirm that it's indeed a bug and not the expected behavior ? |
| Comment by Diego Dupin [ 2017-03-07 ] |
|
Hi, this is indeed a bug. After reading code, this can occur when using ResultSet.getDouble() on a varchar field with a value not numeric, which is permit by JDBC, or another type of field (blob or other). |
| Comment by Diego Dupin [ 2017-03-08 ] |
|
This can occur using ResultSet.getDouble() or ResultSet.getFloat(). Other numeric type (getInt() ...) are already handled. |
| Comment by Julien Stegle [ 2017-03-13 ] |
|
Thanks for your reply ! I suppose that the new 1.5.8 version can be pulled from the maven repository ? |
| Comment by Diego Dupin [ 2017-03-13 ] |
|
Version is available throught maven - version is 1.5.9 |