The problem lies in _NSUtilities.convertNumberIntoCompatibleValue (Number, Class) method, and not in the @sum operator itself: if you use a Number subclass that is not exactly an Integer, Long, Short, Byte, BigInteger or BigDecimal, it build up a new BigDecimal instance using the doubleValue() Number method... :-(
You mention that if you don't use a subclass that is (among others) BigDecimal it does this ... It appears as I'm looking at this (well, it WOULD appear if I looked at decompiled code, which I've stated before, of course I don't do) that it does this specifically IF you use a subclass that is BigDecimal. It seems to me that there's a crucial check missing that if newValueType.isAssignableFrom (value.getClass()) then it should just return the original value without all the other fuss, which would deal w/ the case where you ask to turn a BigDecimal into a BigDecimal.

ms



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to