From 052d19e952abee3ced0456b7412ec51fe8baa51b Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Wed, 23 Apr 2003 07:20:17 +0000 Subject: [PATCH] fix ZipFileSet#getRef for referenced ZipFileSets git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274504 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/types/ZipFileSet.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/org/apache/tools/ant/types/ZipFileSet.java b/src/main/org/apache/tools/ant/types/ZipFileSet.java index 05c1c28b2..ca96cd9a5 100644 --- a/src/main/org/apache/tools/ant/types/ZipFileSet.java +++ b/src/main/org/apache/tools/ant/types/ZipFileSet.java @@ -293,16 +293,14 @@ public class ZipFileSet extends FileSet { stk.push(this); dieOnCircularReference(stk, p); } - Object o = getRefid().getReferencedObject(p); - if (o instanceof FileSet) { - return (AbstractFileSet)(new ZipFileSet((FileSet)o)); - } - else if (!(o instanceof ZipFileSet)) { + if (o instanceof ZipFileSet) { + return (AbstractFileSet) o; + } else if (o instanceof FileSet) { + return (new ZipFileSet((FileSet) o)); + } else { String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset"; throw new BuildException(msg); - } else { - return (AbstractFileSet) o; } } /**