ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/types ZipFileSet.java
Date Wed, 23 Apr 2003 06:45:10 GMT
Sorry for the trouble, I will fix it.
Antoine
----- Original Message -----
From: "Stefan Bodewig" <bodewig@apache.org>
To: <dev@ant.apache.org>
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, <antoine@apache.org> 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: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


Mime
View raw message