ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Martin <j...@mkodo.com>
Subject Re: GzipTest suddenly fails for me
Date Thu, 28 Feb 2002 11:13:20 GMT
It seems that the test expectes a BuildException to be thrown by code
after the validate. Now with my code in there it never runs the pack
method under the circumstances in which it previously through the
exception.

As I understand it what happens is before ant hands over control to
Pack.java it converts and empty file attribute to be the basedir. This
means you can never get an empty file passed in so checking for this
case is redundant. In which case the only thing that is important is
that the source file is a file and does exist and that the destination
file is not an existing directory.

So the only validation required is this.

if (source.isDirectory()) {
    throw new BuildException("Src attribute must not " +
       "represent a directory!", location);
}

if (zipfile.isDirectory()) {
    throw new BuildException("zipfile attribute must not " +
       "represent a directory!", location);
}

Am I right?

On Thu, 2002-02-28 at 08:21, Stefan Bodewig wrote:
> On 27 Feb 2002, Jeff Martin <jeff@custommonkey.org> wrote:
> > Ah, sorry about that. Got side tracked before I finished it. Forgot
> > that that that test didn't pass and submitted the path think I was
> > done.
> 
> But it passed before you modified things?  Still don't understand why.
> 
> Stefan
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
> 
-- 


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message