-
-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
Description
Hello,
I am using the SimpleUnitFormat class using the ASCII flavor. Using the parse method, I get an error when trying to do an exponent operation that should be allowed using the UCUM standard - <ft_us>2. "The exponent is an integer number and is written immediately behind the unit term."
Here's the stack trace I get:
javax.measure.format.MeasurementParseException: unexpected token INTEGER
at app//tech.units.indriya.format.SimpleUnitFormat$DefaultFormat.parseProductUnit(SimpleUnitFormat.java:778)
at app//tech.units.indriya.format.SimpleUnitFormat.parseObject(SimpleUnitFormat.java:332)
at app//tech.units.indriya.format.SimpleUnitFormat$DefaultFormat.parse(SimpleUnitFormat.java:1028)
at app//tech.units.indriya.format.SimpleUnitFormat$DefaultFormat.parse(SimpleUnitFormat.java:1023)
at app//tech.units.indriya.format.SimpleUnitFormat$DefaultFormat.parse(SimpleUnitFormat.java:1019)
However, '<ft_us>^2' does work.
Can you let us know if the standard UCUM exponent format is supported, or if the above error is expected?