antoine 2003/04/23 00:20:17
Modified: src/main/org/apache/tools/ant/types ZipFileSet.java
Log:
fix ZipFileSet#getRef for referenced ZipFileSets
Revision Changes Path
1.19 +5 -7 ant/src/main/org/apache/tools/ant/types/ZipFileSet.java
Index: ZipFileSet.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/ZipFileSet.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ZipFileSet.java 22 Apr 2003 23:33:32 -0000 1.18
+++ ZipFileSet.java 23 Apr 2003 07:20:17 -0000 1.19
@@ -293,16 +293,14 @@
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;
}
}
/**