[CONJ-231] NumberFormatException for getString from BigInt Created: 2015-12-08 Updated: 2016-08-23 Resolved: 2016-08-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.3.3 |
| Fix Version/s: | 1.5.1-RC |
| Type: | Bug | Priority: | Major |
| Reporter: | sfahren | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | DOUBLE, Long.parseLong(), NumberFormatException, queryResult.getString() | ||
| Environment: |
Windows 7, eclipse mars, mariaDB 10.1 |
||
| Description |
|
In version 1.3.2 the handling of reading DOUBLE values with ResultSet.getString() has broken in version 1.3.3. The return value from the getString()-method is now change, so the Long.parseLong() throwing a NumberFormatException. // 1449576922917 //"1.449576736113E12" |
| Comments |
| Comment by Diego Dupin [ 2015-12-14 ] | |||||||||||||||||||||
|
The previous implementation, may return "standard" or scientific notation depending on value and type of query.
Now a getString on a element store in DOUBLE type will return the java Double.toString() value (that most of the time is displayed as scientific value). That will permit for example to use Double.parseDouble(). I understand that can break exactly the case you have, but i may be wrong, but this use case must not be use normally (correct me if not) :
because
example :
| |||||||||||||||||||||
| Comment by Diego Dupin [ 2016-08-23 ] | |||||||||||||||||||||
|
close since no answer since more than 6 month |