Alessio Soldano created CXF-4833:
------------------------------------

             Summary: IndexOutOfBoundException when printing stacktrace for 
ToolException
                 Key: CXF-4833
                 URL: https://issues.apache.org/jira/browse/CXF-4833
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.7.3, 2.6.6
            Reporter: Alessio Soldano
            Assignee: Alessio Soldano
             Fix For: 2.8.0, 2.7.4, 2.6.7


I'm getting a IndexOutOfBoundsException when printing a ToolException. Seems 
like a missing check on the hasSuppressed flag for cause exception.

{code}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at 
org.apache.cxf.tools.common.ToolException.printStackTrace(ToolException.java:120)
        at 
org.apache.cxf.tools.common.ToolException.printThrowable(ToolException.java:126)
        at 
org.apache.cxf.tools.common.ToolException.printStackTrace(ToolException.java:121)
        at 
org.apache.cxf.tools.common.ToolException.printStackTrace(ToolException.java:104)
        at 
org.jboss.wise.core.client.consumer.WiseCXFConsumerImpl.consume(WiseCXFConsumerImpl.java:265)
        at 
org.jboss.ws.api.tools.WSContractConsumer.consume(WSContractConsumer.java:210)
        at 
org.jboss.wise.core.consumer.impl.jbossws.DefaultWSImportImpl.runWSConsume(DefaultWSImportImpl.java:90)
        at 
org.jboss.wise.core.consumer.impl.jbossws.DefaultWSImportImpl.importObjectFromWsdl(DefaultWSImportImpl.java:85)
        at 
org.jboss.wise.core.consumer.impl.WSConsumerTest.parseHelloGreetingWSDLShouldFailWithPackageAndNoBindingsForNameDuplication(WSConsumerTest.java:80)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at 
org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:22)
        ... 22 more
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to