peterreilly 2004/05/10 02:19:30
Modified: src/main/org/apache/tools/ant/taskdefs Concat.java
Log:
Concat throws ArrayIndexOutOfBounds with fixlastline
PR: 28820
Reported by: Andre Vanha
Revision Changes Path
1.35 +3 -1 ant/src/main/org/apache/tools/ant/taskdefs/Concat.java
Index: Concat.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Concat.java 9 Mar 2004 16:48:04 -0000 1.34
+++ Concat.java 10 May 2004 09:19:30 -0000 1.35
@@ -677,6 +677,8 @@
private Reader getReader() throws IOException {
if (reader == null) {
+ log("Concating file " + sourceFiles.elementAt(pos),
+ Project.MSG_VERBOSE);
if (encoding == null) {
reader = new BufferedReader(
new FileReader((File) sourceFiles.elementAt(pos)));
@@ -773,7 +775,7 @@
for (int i = nRead;
i > (nRead - lastChars.length);
--i) {
- if (i < 0) {
+ if (i <= 0) {
break;
}
addLastChar(cbuf[off + i - 1]);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]