commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-365) BooleanUtils.toBoolean() - invalid drop-thru in case statement causes StringIndexOutOfBoundsException
Date Fri, 26 Oct 2007 19:04:50 GMT

     [ https://issues.apache.org/jira/browse/LANG-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb updated LANG-365:
----------------------

    Attachment: BooleanUtils.patch

Patch to fix bug

> BooleanUtils.toBoolean() - invalid drop-thru in case statement causes StringIndexOutOfBoundsException
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LANG-365
>                 URL: https://issues.apache.org/jira/browse/LANG-365
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Sebb
>         Attachments: BooleanUtils.patch, BooleanUtilsTest.patch
>
>
> The method BooleanUtils.toBoolean() has a case statement; case 3 drops through to case
4; this can cause StringIndexOutOfBoundsException, for example with the test:
> assertEquals(false, BooleanUtils.toBoolean("tru"));
> The end of case 3 should return false.
> Patch to follow for source and unit test.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message