Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1204

StringIndexOutOfBounds for blueprint apps that have constructors with multiple exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Proxy
    • None

    Description

      If a blueprint application has classes that have constructors that throw multiple exceptions, such as:

      public MyClass(String something) throws IllegalStateException, NumberFormatException {
      ...

      The ASM Method.getMethod(String) call fails with a StringIndexOutOfBoundsException.

      It's not 100% clear from the ASM method Javadoc, but I suspect that it's not expecting any throws declaration in the string passed in.

      The problem occurs in ProxySubclassAdapter.visit when it tried to get the constructor, and although there is a Method.getMethod(Constructor) method, this returns a different return value (method name is always "<init>"), which still doesn't work.

      So, the rather inelegant solution appears to be to strip off the exceptions from the method string.

      Diff will be attached.

      Attachments

        1. ProxyMultipleThrows.diff
          1 kB
          Simon Gormley

        Activity

          People

            hughesj Jeremy Hughes
            sgormley Simon Gormley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: