----- Original Message -----
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 08:20
Subject: GzipTest suddenly fails for me
> and I don't understand why it has ever worked.
>
> The test causing trouble is test4:
>
> <target name="test4">
> <gzip src="gzip.xml" zipfile=""/>
> </target>
>
> 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
> well.
>
> 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
> basedir.
>
> 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.
Is this a shroedingbug? A defect that exists neither working or not working
until you look at it, and suddenly it collapses into a state, usually 'that
could never have worked'
..the test did work for me on a winXP/java1.3 box last night, else I wouldnt
have committed the changes.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>