ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject GzipTest suddenly fails for me
Date Wed, 27 Feb 2002 16:20:52 GMT
and I don't understand why it has ever worked.

The test causing trouble is test4:

<target name="test4">
  <gzip src="gzip.xml" zipfile=""/>

This has been the target for a veeery long time.  GzipTest expects it
to fail because zipfile is not valid (so it says) - no changes here as

The code in Pack that is supposed to throw the BuildException has been

        if (zipFile == null) {
            throw new BuildException("zipfile attribute is required", location);

until Jeff's patch turned it into

        if (zipFile == null || zipFile.getName().equals("")) {
            throw new BuildException("zipfile attribute is required", location);

OK, now I pass an empty String as zipfile attribute, this will go
through Project.resolveFile and gets out of this as the project's

At least on my box, getName() on the project's basedir returns the
name of the directory and not an empty String - i.e. taskdefs in the
case of our testcase.  This explains why the second condition cannot
be matched.

zipFile is non-null and I cannot see how this test can have ever
passed as it shouldn't have been null at any time.

Any idea?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message