tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick McGuire (JIRA)" <j...@apache.org>
Subject [jira] Closed: (OPENEJB-853) CmpUtil.getCmpImplClassName can throw StringIndexOutOfBoundsException
Date Wed, 09 Jul 2008 13:23:31 GMT

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

Rick McGuire closed OPENEJB-853.
--------------------------------

    Resolution: Fixed

Committed revision 675161.

> CmpUtil.getCmpImplClassName can throw StringIndexOutOfBoundsException
> ---------------------------------------------------------------------
>
>                 Key: OPENEJB-853
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-853
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: cmp2
>            Reporter: Rick McGuire
>            Assignee: Rick McGuire
>            Priority: Minor
>
> The CmpUtil.getCmpImplClassName() method has logic to handle classes with no package
names.  Unfortunately, that logic is not correct.  The line 
>    String cmpImplClass = ejbClass.substring(0, ejbClass.lastIndexOf('.'));
> Will result in a StringIndexOutOfBoundsException if no "." is found in the classname
because substring(0, -1) is not a valid string range. 

-- 
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