Hi Conor, I have coded the calls to the getters of ZipFileSet similarly to the getters of FileSet or AbstractFileSet in Zip.java.
I was not aware that ZipFileSet inherits from ProjectComponent and thus has its own getProject() method. I wonder whether calls to getters of datatypes having refids is not often coded in this way datatypeinstance.getSomeAttribute(getProject()) Can we safely to change all the getters of AbstractFileSet and ZipFileSet and change their API from getSomeAttribute(Project project) to getSomeAttribute(), and then use this.getProject() in the implementation of the getter to find the referred-to data in the case the FileSet is actually a reference ? Antoine ----- Original Message ----- From: "Conor MacNeill" <[EMAIL PROTECTED]> To: "Ant Developers List" <[EMAIL PROTECTED]> Sent: Saturday, April 19, 2003 1:34 AM Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant/types ZipFileSet.java defaults.properties > On Sat, 19 Apr 2003 08:02 am, [EMAIL PROTECTED] wrote: > > antoine 2003/04/18 15:02:59 > > > > Index: Zip.java > > =================================================================== > > RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v > > retrieving revision 1.103 > > retrieving revision 1.104 > > diff -u -r1.103 -r1.104 > > --- Zip.java 27 Mar 2003 10:02:04 -0000 1.103 > > +++ Zip.java 18 Apr 2003 22:02:58 -0000 1.104 > > @@ -67,7 +67,6 @@ > > import java.util.Vector; > > import java.util.zip.CRC32; > > import java.util.zip.ZipFile; > > -import java.util.zip.ZipInputStream; > > > > import org.apache.tools.ant.BuildException; > > import org.apache.tools.ant.DirectoryScanner; > > @@ -541,10 +540,10 @@ > > ZipFileSet zfs = null; > > if (fileset instanceof ZipFileSet) { > > zfs = (ZipFileSet) fileset; > > - prefix = zfs.getPrefix(); > > - fullpath = zfs.getFullpath(); > > - dirMode = zfs.getDirMode(); > > - fileMode = zfs.getFileMode(); > > + prefix = zfs.getPrefix(getProject()); > > + fullpath = zfs.getFullpath(getProject()); > > + dirMode = zfs.getDirMode(getProject()); > > + fileMode = zfs.getFileMode(getProject()); > > } > > > > Passing the project around like this should not be necessary since the > zipfileset is a ProjectComponent and should have its own project reference. > Hmmm, it may even be a different project instance. > > Conor > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >