Export to GitHub

testability-explorer - issue #1

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


Posted on Aug 5, 2008 by Massive Camel

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">

  &lt;fileset dir=&quot;${buildscripts.dir}/lib&quot;&gt;
     &lt;include name=&quot;printer-framework.jar&quot;/&gt;
  &lt;/fileset&gt;
 &lt;/googletest:testability&gt;

</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.

Comment #1

Posted on Aug 5, 2008 by Massive Camel

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)

Status: New

Labels:
Type-Defect Priority-Medium