Bug 28820 - Concat throws ArrayIndexOutOfBounds
Summary: Concat throws ArrayIndexOutOfBounds
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.1
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.6.2
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-07 00:08 UTC by Andre Vanha
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Vanha 2004-05-07 00:08:55 UTC
Using concat with the fixlastline option fails on an input boundary condition.

java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.tools.ant.taskdefs.Concat$MultiReader.read(Concat.java:784
)
        at org.apache.tools.ant.taskdefs.Concat.concatenate(Concat.java:514)
        at org.apache.tools.ant.taskdefs.Concat.cat(Concat.java:463)
        at org.apache.tools.ant.taskdefs.Concat.execute(Concat.java:372)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)

I haven't had a chance to see exactly what the boundary is, but adding an extra
line to one of the last input files read before the failure occurrs works around
the problem.

It would be a nice-to-have if the concat task displayed the path of processed
files at verbose or debug level.
Comment 1 peter reilly 2004-05-07 11:26:36 UTC
Is is possible to get the files that caused
the problem?
Comment 2 peter reilly 2004-05-10 09:20:50 UTC
Fixed in cvs,
Thanks for the report
Comment 3 Cameron Johnson 2006-09-05 16:02:25 UTC
I am having the same problem with Apache Ant version 1.6.5 compiled on June 2 
2005.
Comment 4 Matt Benson 2006-09-05 16:06:04 UTC
Please submit an example to evoke this undesirable behavior.  Thanks!
Comment 5 Cameron Johnson 2006-09-05 19:29:01 UTC
Sorry I thought our build machine was using Ant version 1.6.5 but it actually 
was using 1.6.0  my mistake.