Fixed in CVS, thanks Stephen ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 8:47 AM > To: [EMAIL PROTECTED] > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]