Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4833

IndexOutOfBoundException when printing stacktrace for ToolException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.6, 2.7.3
    • Fix Version/s: 2.7.4, 2.6.7, 3.0.0-milestone1
    • Component/s: Tooling
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

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

      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
      

        Attachments

          Activity

            People

            • Assignee:
              asoldano Alessio Soldano
              Reporter:
              asoldano Alessio Soldano
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: