Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-853

CmpUtil.getCmpImplClassName can throw StringIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.7.0
    • (not version related)
    • cmp2
    • None

    Description

      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.

      Attachments

        Activity

          People

            rickmcguire Richard McGuire
            rickmcguire Richard McGuire
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: