commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang] NumbersTest.java
Date Wed, 03 Jul 2002 04:33:58 GMT

I guess that Numbers needs to support all the add, divide, min methods for
Number that BigDecimal has for itself.

Soon have this writing finished, just 3 more tips to go. Need to quit
this job :)

Hen

On Tue, 2 Jul 2002, Stephen Colebourne wrote:

> Yes, it looks like the intention of the code is to return the correct type,
> and thus it should treat the letters f, d, l as more important than trusting
> the java methods. Both cases should be handled. Both should drop back to
> BigDeciomal/BigInteger as appropriate.
>
> Can you fix the class, expanding on the javadoc to explain how it works? I'd
> rather hold off on the test just until it runs without errors ;-)
>
> Stephen
>
> ----- Original Message -----
> From: "Rand McNeely" <rand_mcneely@yahoo.com>
> To: "'Jakarta Commons Developers List'" <commons-dev@jakarta.apache.org>
> Sent: Tuesday, July 02, 2002 4:16 AM
> Subject: [lang] NumbersTest.java
>
>
> >
> >
> > One of the tests is actually failing (createNumber(String) 3) on JDK
> > 1.4.  If I am understanding the intentions of createNumber, it should
> > return a Double when passed "1234.5D" but it is returning a Float.  It
> > looks like Float.valueOf(String) is not throwing a NumberFormatException
> > for "1234.5D" as you would expect (Long.valueOf(String) will throw an
> > exception for "12345L") - a small inconsistency in the JDK.
> >
> > Should we modify the logic to first check for F's or D's before the
> > indiscriminately calling createFloat and createDouble?
> >
> > Rand
> >
> >
> >
>
>
> ----------------------------------------------------------------------------
> ----
>
>
> > --
> > To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message