Issue Details (XML | Word | Printable)

Key: JDBC-517
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

Consistently use BigDecimal.valueOf(double) *or* new BigDecimal(double)

Created: 21/Jan/18 02:43 PM   Updated: 21/Jan/18 02:43 PM
Component/s: JDBC driver
Affects Version/s: None
Fix Version/s: None

 Description  « Hide
The BigDecimal float/double conversion is a bit mixed. FBBigDecimalField and FBDecFloatField use equivalents of `BigDecimal.valueOf(double)` when setting double values, but FBFloatField and FBDoubleField use new BigDecimal(double) when getting a float/double as BigDecimal.

For consistency it might be better to use BigDecimal.valueOf(double) for both, although this may lead to a perceived loss of 'precision' for FBFloatField and FBDoubleField given the differences between the two methods of obtaining a BigDecimal from a floating point type.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.