From d4dd76a8821efae59cde94c6d12bff7dc0bc8e2d Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Tue, 22 Apr 2003 23:33:32 +0000 Subject: [PATCH] fix because of class cast exception detected git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274502 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/types/ZipFileSet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/types/ZipFileSet.java b/src/main/org/apache/tools/ant/types/ZipFileSet.java index 65b16c7d4..05c1c28b2 100644 --- a/src/main/org/apache/tools/ant/types/ZipFileSet.java +++ b/src/main/org/apache/tools/ant/types/ZipFileSet.java @@ -295,7 +295,10 @@ public class ZipFileSet extends FileSet { } Object o = getRefid().getReferencedObject(p); - if (!(o instanceof ZipFileSet) && !(o instanceof FileSet)) { + if (o instanceof FileSet) { + return (AbstractFileSet)(new ZipFileSet((FileSet)o)); + } + else if (!(o instanceof ZipFileSet)) { String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset"; throw new BuildException(msg); } else {