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] Created: (OPENEJB-853) CmpUtil.getCmpImplClassName can throw StringIndexOutOfBoundsException
Date Wed, 09 Jul 2008 12:57:31 GMT
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