harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Unexpected behaviour of DecimalFormat and spaces
Date Fri, 04 Sep 2009 13:09:19 GMT
Whilst testing Commons Math on Harmony, I came across a difference in
DecimalFormat from the Sun Java implementation.

Sun Java won't strip leading spaces from numbers, and stops at the
first space, whereas Harmony seems to strip all spaces - leading,
embedded and trailing.

So the string " 1 2 3   " is parsed by Harmony as the number 123.
Sun Java returns null (leading space). If the leading space is
removed, Sun returns 1.

Is this difference intentional?

If not, I can file a JIRA if required.

Mime
View raw message