From ee8253d44092b233c85c7fa6dfba4d0cfb212208 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Wed, 21 Sep 2005 19:49:29 +0000 Subject: [PATCH] add toString implementation git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@290807 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/types/resources/Restrict.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/types/resources/Restrict.java b/src/main/org/apache/tools/ant/types/resources/Restrict.java index 0010ae546..07bbe60ca 100755 --- a/src/main/org/apache/tools/ant/types/resources/Restrict.java +++ b/src/main/org/apache/tools/ant/types/resources/Restrict.java @@ -53,7 +53,6 @@ outer: for (Iterator ri = w.getResourceCollection().iterator(); ri.hasNext( } return result; } - }; /** @@ -131,4 +130,16 @@ outer: for (Iterator ri = w.getResourceCollection().iterator(); ri.hasNext( return w.isFilesystemOnly(); } + /** + * Format this Restrict collection as a String. + * @return the String value of this collection. + */ + public synchronized String toString() { + if (isReference()) { + return getCheckedRef().toString(); + } + dieOnCircularReference(); + return w.toString(); + } + }