commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [LANG] Possible bug on NumberUtils.isNumber()?
Date Sun, 08 Jun 2003 14:31:24 GMT
Fixed in CVS, thanks
Stephen
----- Original Message -----
From: <EPugh@upstate.com>
To: <commons-dev@jakarta.apache.org>
Sent: Thursday, June 05, 2003 1:59 PM
Subject: RE: [LANG] Possible bug on NumberUtils.isNumber()?


> Here is a patch for
>
> Attached is a patch file for NumberUtilsTest.  It just adds
>
>         val = "1a";
>         assertTrue("isNumber(String) 15 Neg failed",
> !NumberUtils.isNumber(val));
>         assertTrue("isNumber(String)/createNumber(String) 15 Neg failed",
> !checkCreateNumber(val));
>
> to the isNumber testcase.
>
> Eric Pugh
>
> -----Original Message-----
> From: EPugh@upstate.com [mailto:EPugh@upstate.com]
> Sent: Thursday, June 05, 2003 8:47 AM
> To: commons-dev@jakarta.apache.org
> Subject: [LANG] Possible bug on NumberUtils.isNumber()?
>
>
> Hi all,
>
> I am checking whether "1b" is a number, and NumberUtils.isNumber() says it
> is...  Is the lowercase b mean binary or something?
>
> Here is my testcase:
>  public void testNumberUtilsIsNumber()
>     {
>         String a = "1b";
>
>         assertTrue("1b is not a number!", !NumberUtils.isNumber(a));
>
>
>     }
>
>
> And here is my error:
>
> Testcase: testNumberUtilsIsNumber took 0 sec
> FAILED
> 1b is not a number!
> junit.framework.AssertionFailedError: 1b is not a number!
> at
>
com.upstate.commons.utils.comparators.NumberComparatorTestCase.testNumberUti
> lsIsNumber(NumberComparatorTestCase.java:319)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:231)
>
>
> Eric Pugh
>
>


----------------------------------------------------------------------------
----


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


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


Mime
View raw message