ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <stre...@healthlanguage.com>
Subject Re: FTP optional task won't compile
Date Fri, 27 Jul 2001 18:50:07 GMT
Here's why I can't see how this ever compiled (in the 1.3 release):

In the FTP.java file, you have this:

        FileScanner ds;

        if (action == SEND_FILES) {
            ds = fs.getDirectoryScanner(project);
        } else {
            ds = new FTPDirectoryScanner(ftp);
            fs.setupDirectoryScanner(ds, project);
            ds.scan();
        }                        

Note that ds is defined as type FileScanner.  FTPDirectoryScanner
extends DirectoryScanner which implements FileScanner, so the line

            ds = new FTPDirectoryScanner(ftp);

compiles ok.  However, the next line

            fs.setupDirectoryScanner(ds, project);

does not compile since the setupDirectoryScanner method expects a
DirectoryScanner object, not a FileScanner.

The code, as obtained from the 1.3 source distribution, does not compile
without changing the declaration of ds to DirectoryScanner.

Did I take stupid pills somewhere? What am I missing that allows this to
compile on your system?

Thanks.

"Larry V. Streepy, Jr." wrote:
> 
> I compared my version (the 1.3 release version) with the head of the
> tree (1.6) and the line in question was no different.
> 
> I'm guessing that some other changes have taken place in the post 1.3
> work that make FileScanner and DirectoryScanner compatible?
> 
> Stefan Bodewig wrote:
> >
> > Larry,
> >
> > I have no problems compiling the FTP task with a current CVS version
> > of everything - and the error message you give shows that you are
> > using a not up-to-date version of the FTP source (line number and
> > source don't match).
> >
> > I don't think a patch is necessary, you'll need to make sure that you
> > have compatible versions of everything, that's probably all.
> >
> > Stefan
> 
> --
> Larry V. Streepy, Jr.
> Chief Technical Officer and VP of Engineering
> 
> Health Language, Inc.  -- "We speak the language of healthcare"
> 
> 970/626-5028 (office)           mailto:streepy@healthlanguage.com
> 970/626-4425 (fax)              http://www.healthlanguage.com

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Mime
View raw message