You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2007/07/24 00:35:22 UTC
svn commit: r558886 -
/ant/core/trunk/src/main/org/apache/tools/ant/filters/HeadFilter.java
Author: mbenson
Date: Mon Jul 23 15:35:18 2007
New Revision: 558886
URL: http://svn.apache.org/viewvc?view=rev&rev=558886
Log:
should speed this filter somewhat
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/filters/HeadFilter.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/HeadFilter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/filters/HeadFilter.java?view=diff&rev=558886&r1=558885&r2=558886
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/HeadFilter.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/HeadFilter.java Mon Jul 23 15:35:18 2007
@@ -62,6 +62,9 @@
/** the position in the current line */
private int linePos = 0;
+ /** Whether this filter is finished */
+ private boolean eof;
+
/**
* Constructor for "dummy" instances.
*
@@ -107,6 +110,9 @@
return -1;
}
line = headFilter(line);
+ if (eof) {
+ return -1;
+ }
linePos = 0;
}
@@ -206,6 +212,7 @@
if (lines > 0) {
if (linesRead > (lines + skip)) {
+ eof = true;
return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org