Simon Gormley created ARIES-1204:
------------------------------------
Summary: StringIndexOutOfBounds for blueprint apps that have
constructors with multiple exceptions
Key: ARIES-1204
URL: https://issues.apache.org/jira/browse/ARIES-1204
Project: Aries
Issue Type: Bug
Components: Proxy
Reporter: Simon Gormley
Attachments: ProxyMultipleThrows.diff
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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)