From 6aa494cb3ead80424245567eb4d3eaf71bbfb5f1 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Thu, 27 Aug 2009 07:17:24 +0000
Subject: [PATCH] UniqFilter is not only simpler if implemented as a
TokenFilter, it is even more useful as well
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@808304 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 4 +-
docs/manual/CoreTypes/filterchain.html | 33 ++++++-------
.../apache/tools/ant/filters/UniqFilter.java | 46 ++++---------------
.../filters/expected/unique-columns.txt | 1 +
.../antunit/filters/input/unique-columns.txt | 1 +
src/tests/antunit/filters/uniq-test.xml | 24 +++++++++-
6 files changed, 49 insertions(+), 60 deletions(-)
create mode 100644 src/tests/antunit/filters/expected/unique-columns.txt
create mode 100644 src/tests/antunit/filters/input/unique-columns.txt
diff --git a/WHATSNEW b/WHATSNEW
index 1e796e510..0214e82dd 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -927,8 +927,8 @@ Other changes:
added.
Bugzilla Report 40504.
- * A new filterreader that suppresses lines that match
- their ancestor line has been added.
+ * A new token filter that suppresses tokens that match
+ their ancestor token has been added.
Changes from Ant 1.7.0 TO Ant 1.7.1
=============================================
diff --git a/docs/manual/CoreTypes/filterchain.html b/docs/manual/CoreTypes/filterchain.html
index dfde25dcd..df9cf27d8 100644
--- a/docs/manual/CoreTypes/filterchain.html
+++ b/docs/manual/CoreTypes/filterchain.html
@@ -125,7 +125,6 @@ nested elements.
TokenFilter
FixCRLF
SortFilter
-UniqFilter
@@ -1032,6 +1031,7 @@ and \\.
Trim
IgnoreBlank
DeleteCharacters
+ UniqFilter
The following string filters are provided by the optional distribution.
@@ -1360,6 +1360,20 @@ Delete tabs from lines, trim the lines and removes empty lines.
+UniqFilter
+
+Suppresses all tokens that match their ancestor token. It is most
+ useful if combined with a sort filter.
+
+Example:
+
+This suppresses duplicate lines.
+
+<tokenfilter>
+ <uniqfilter/>
+</tokenfilter>
+
+
ScriptFilter
This is an optional filter that executes a script in a
Apache BSF
@@ -1495,21 +1509,4 @@ This may be used as follows:
</copy>
-
-
-Suppresses all lines that match their ancestor line. It is most
- useful if combined with a sort filter.
-
-Example:
-
-This suppresses duplicate lines.
-
-<filterreader classname="org.apache.tools.ant.filters.UniqFilter"/>
-
-
-Convenience method:
-
-<uniqfilter/>
-
-