Use Advanced Search to search the entire archive.
[jsr363-experts] some things :)
- From: Leonardo Lima <
>
- To: "
" <
>
- Subject: [jsr363-experts] some things :)
- Date: Thu, 11 Dec 2014 14:22:17 -0200
Let's keep this in the mailing lists :)
On Mon, Dec 1, 2014 at 10:03 AM, Werner Keil
<
>
wrote:
>
>
About the Freescale trial, did you use the old binary and "stable" ME
>
example or more recent versions especially of the API?
>
I checked out HEAD and compiled it in side the ME SDK, so no old binary
here.
>
I saw the Locale ticket and while it's an optional bundle, it seems best
>
to leave Locale out of the API.
>
I agree, the API as a whole (with its optionals) should be ME SDK
compilable.
>
I also filed one related to an inconsistency in UnitFormat
>
implementations. Something that worked or was since fixed in other
>
implementations but the codebase for the RI/SE port seems to be missing a
>
thing or two. With this fix e.g. KILO(GRAM) works properly and is formatted
>
the same way as KILOGRAM.
>
>
One important question that might also deserve a JIRA ticket is how the
>
equals() method (and where applicable others including compareTo()) should
>
deal with some Java inconsistencies, e.g. KILOGRAM normally results in a
>
BaseUnit while KILO(GRAM) becomes a TransformedUnit or similar. Hence
>
KILOGRAM.equals(KILO(GRAM)) is false simply because the two classes
>
underneath currently use standard equals() behavior that takes the exact
>
class into consideration. This seems correct in general Java terms, e.g.
>
BigInteger.ONE.equals(Integer.valueOf(1)) will also be false though the
>
numeric value is the same. You'd have to compare something like
>
doubleValue() to make it work, similar for different Unit implementations
>
getSymbol() getName() where available or a combination of both usually
>
work, especially for KILOGRAM vs. KILO(GRAM).
>
I agree it should be in a Jira issue, but briefly I believe that we should
convert one of the units to the other and than do the comparison in case of
different classes...
Regards,
Leonardo.
>
>
Regards,
>
Werner
>