Browse Source

Concat throws ArrayIndexOutOfBounds with fixlastline

PR: 28820
Reported by: Andre Vanha


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276440 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
0852629ad9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/Concat.java

+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/Concat.java View File

@@ -677,6 +677,8 @@ public class Concat extends Task {

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 @@ public class Concat extends Task {
for (int i = nRead;
i > (nRead - lastChars.length);
--i) {
if (i < 0) {
if (i <= 0) {
break;
}
addLastChar(cbuf[off + i - 1]);


Loading…
Cancel
Save