You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2007/10/26 21:02:50 UTC
[jira] Updated: (LANG-365) BooleanUtils.toBoolean() - invalid
drop-thru in case statement causes StringIndexOutOfBoundsException
[ https://issues.apache.org/jira/browse/LANG-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb updated LANG-365:
----------------------
Attachment: BooleanUtilsTest.patch
Update Unit test to expose 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: 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.