dbremner / testability-explorer

Automatically exported from code.google.com/p/testability-explorer
Apache License 2.0
0 stars 0 forks source link

Index out of bounds exception when using print="html" #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Setup the following in my ant file:

<project name="moo"
   xmlns:googletest="antlib:com.google.ant"
>

  <taskdef name="testability" classname="com.google.ant.TestabilityTask"
uri="antlib:com.google.ant">
      <classpath>
         <pathelement
location="${buildscripts.dir}/lib/ant-testability-explorer.jar" />
         <pathelement
location="${buildscripts.dir}/lib/testability-explorer.jar" />
      </classpath>
   </taskdef>

 <target name="testability-simple" >
     <googletest:testability  resultfile="testability.result.html"
print="html">

      <fileset dir="${buildscripts.dir}/lib">
         <include name="printer-framework.jar"/>
      </fileset>
     </googletest:testability>
   </target>

What is the expected output? What do you see instead?
If I don't use the print="html", the file contains the same output as from
the command line (text).  When using the html flag, I get the below.  There
is nothing in the error file when that flag is added.

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1  (on the ant line
which includes the print="html")

What version of the product are you using? On what operating system?
ant-testability-explorer-1.2.0-r54.jar and same version of testability-explorer

Please provide any additional information below.
Works the same when i remove namespace info.

Original issue reported on code.google.com by johnsi...@gmail.com on 5 Aug 2008 at 4:58

GoogleCodeExporter commented 8 years ago

Full exception
java.lang.IndexOutOfBoundsExcept
ion: Index: 1, Size: 1
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:115)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at com.google.test.metric.Testability.getReportPrinter(Testability.java:
174)
        at com.google.test.metric.Testability.postParse(Testability.java:167)
        at com.google.test.metric.Testability.execute(Testability.java:230)
        at com.google.test.metric.Testability.main(Testability.java:136)
        at com.google.ant.TestabilityTask.runTestabilityExplorer(TestabilityTask
.java:116)
        at com.google.ant.TestabilityTask.execute(TestabilityTask.java:103)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        ... 11 more
--- Nested Exception ---
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at com.google.test.metric.Testability.getReportPrinter(Testability.java:
174)
        at com.google.test.metric.Testability.postParse(Testability.java:167)
        at com.google.test.metric.Testability.execute(Testability.java:230)
        at com.google.test.metric.Testability.main(Testability.java:136)
        at com.google.ant.TestabilityTask.runTestabilityExplorer(TestabilityTask
.java:116)
        at com.google.ant.TestabilityTask.execute(TestabilityTask.java:103)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Original comment by johnsi...@gmail.com on 5 Aug 2008 at 9:14