You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Rand McNeely <ra...@yahoo.com> on 2002/07/06 18:44:50 UTC
[lang] patch Numbers/NumbersTest
Modified Numbers.isNumber to return true iff Numbers.createNumber can
create a number.
Changed the null handling in createNumber to throw a
NullPointerException if null was passed. This is more inline with the
JDK number parsing routines. Comments?
One final thing, createNumber only returns hex if the string uses the 0x
qualifier. I didn't like the idea of the user thinking things like
"ABC123" were interpreted as hex and then passing in "123E45" and
getting a Double.
Rand
RE: [lang] patch Numbers/NumbersTest
Posted by Rand McNeely <ra...@yahoo.com>.
I'd be happy to fix the test but my hard drive crashed Saturday and
it'll be a few days before I'm back up and running (my backups were on a
hard drive that crashed 4 days earlier - what are the chances of
that??).
-----Original Message-----
From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
Sent: Monday, July 08, 2002 5:14 PM
To: Jakarta Commons Developers List
Subject: Re: [lang] patch Numbers/NumbersTest
Patch mostly applied, thanks
I did not apply the NullPointerException code. At the moment, the rest
of
the Strings class is being coded to return null if passed in null. This
needs to be discussed if Numbers is to be different (and may need guards
in
the createFloat etc. methods)
I haven't changed the test, so the test fails at present.
Stephen
----- Original Message -----
From: "Rand McNeely" <ra...@yahoo.com>
To: "'Jakarta Commons Developers List'" <co...@jakarta.apache.org>
Sent: Saturday, July 06, 2002 5:44 PM
Subject: [lang] patch Numbers/NumbersTest
> Modified Numbers.isNumber to return true iff Numbers.createNumber can
> create a number.
>
> Changed the null handling in createNumber to throw a
> NullPointerException if null was passed. This is more inline with the
> JDK number parsing routines. Comments?
>
> One final thing, createNumber only returns hex if the string uses the
0x
> qualifier. I didn't like the idea of the user thinking things like
> "ABC123" were interpreted as hex and then passing in "123E45" and
> getting a Double.
>
> Rand
>
------------------------------------------------------------------------
----
----
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [lang] patch Numbers/NumbersTest
Posted by Stephen Colebourne <sc...@btopenworld.com>.
Patch mostly applied, thanks
I did not apply the NullPointerException code. At the moment, the rest of
the Strings class is being coded to return null if passed in null. This
needs to be discussed if Numbers is to be different (and may need guards in
the createFloat etc. methods)
I haven't changed the test, so the test fails at present.
Stephen
----- Original Message -----
From: "Rand McNeely" <ra...@yahoo.com>
To: "'Jakarta Commons Developers List'" <co...@jakarta.apache.org>
Sent: Saturday, July 06, 2002 5:44 PM
Subject: [lang] patch Numbers/NumbersTest
> Modified Numbers.isNumber to return true iff Numbers.createNumber can
> create a number.
>
> Changed the null handling in createNumber to throw a
> NullPointerException if null was passed. This is more inline with the
> JDK number parsing routines. Comments?
>
> One final thing, createNumber only returns hex if the string uses the 0x
> qualifier. I didn't like the idea of the user thinking things like
> "ABC123" were interpreted as hex and then passing in "123E45" and
> getting a Double.
>
> Rand
>
----------------------------------------------------------------------------
----
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>