Issue Details (XML | Word | Printable)

Key: JSCIENCE-105
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: jscience-issues
Reporter: zeled
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jscience

MeasureFormat.parse returns wrong value for negative numbers expressed using a CompoundUnit

Created: 06/Oct/08 09:38 AM   Updated: 31/Jan/11 02:49 AM
Component/s: www
Affects Version/s: current
Fix Version/s: Version 6.0

Time Tracking:
Not Specified

File Attachments: 1. Java Source File MeasureFormatTest.java (1 kB) 06/Oct/08 09:40 AM - zeled

Environment:

Operating System: All
Platform: All


Issuezilla Id: 105
Tags:
Participants: jscience-issues and zeled


 Description  « Hide

Value aggregated during parse of a measure which is expressed using CompoundUnit
symbols (like °:':") is wrong if the leading value is a negative number.

For example, parsing 13°15' gives -765' (-13*60+15) instead of -795' ((13*60+15))!



zeled added a comment - 06/Oct/08 09:40 AM

Created an attachment (id=13)
Test to demonstrate MeasureFormat.parse bug for negative numbers + compound unit