Sorry for the trouble, I will fix it.
Antoine
----- Original Message -----
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 23, 2003 8:24 AM
Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant/types
ZipFileSet.java
> On 22 Apr 2003, <[EMAIL PROTECTED]> wrote:
>
> > + if (o instanceof FileSet) {
> > + return (AbstractFileSet)(new ZipFileSet((FileSet)o));
>
> the cast is not needed here.
>
> > + }
> > + else if (!(o instanceof ZipFileSet)) {
>
> will always be true as instanceof ZipFileSet implies instanceof
> FileSet.
>
> Maybe you really wanted something like
>
> if (o instanceof FileSet) {
> 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);
> }
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>