Opened 17 years ago

Closed 17 years ago

#688 closed defect (fixed)

Don't use Float.valueOf() or Float.parseString() to parse integer values

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: blocker Milestone: BASE 2.4
Component: core Version:
Keywords: Cc:

Description

A float doesn't have enough precision to be able to parse with correct results if the number is big. For example: Float.valueOf("1222905471").intValue() -> 1222905472 This is probably the cause for #658: Invalid request ID: Data in your configuration wizard has become corrupted. Please re-start and try again.

We should use the corresponding functions from Double instead.

Change History (3)

comment:1 by Nicklas Nordborg, 17 years ago

(In [3574]) References #658: Compare requestId as strings instead of integers to avoid problem with integer conversion (see #688)

comment:2 by Nicklas Nordborg, 17 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:3 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [3590]) Fixes #688: Don't use Float.valueOf() or Float.parseString() to parse integer values

Note: See TracTickets for help on using tickets.