ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: [PATCH] Core Selector Tests
Date Sat, 01 Jun 2002 07:32:06 GMT

----- Original Message -----
From: "Bruce Atherton" <>
To: "Ant Developers List" <>
Sent: Friday, May 31, 2002 10:23 PM
Subject: Re: [PATCH] Core Selector Tests

> At 08:54 PM 5/31/02 -0400, Magesh Umasankar wrote:
> >Bad old NT 4.0.
> I think I asked the wrong question. After going through the other code,
> googling usenet, performing experiments and finally as a last resort
> checking the documentation, I have a suspicion I know what is going on.
> are using JDK 1.1, aren't you?
> Here is the important line from the touch task documentation page. I had
> read it before but hadn't fully registered it until now.
>      For JDK 1.1 only the creation of new files with a modification time
> now works, all other cases will emit a warning.

I knew that :)

> What this implies (in case you had as much trouble with that line as I
> originally did) is that my use of the <touch> task to set the timestamps
> existing files won't work for a JDK 1.1 VM. The File.setLastModified()
> is @since 1.2. The fix in this case is obvious, skip all date testing if
> running under a JDK 1.1 VM. To be safe, depend testing should be turned
> as well because, although it works now, it could fail any time in the
> future if the original files' dates are changed.

If you look at the tests for <copy>, we set dates on files not by using
<touch timestamp>, but raw <touch> followed by <sleep>. So we push the date
of files into the past not by altering their timestamp, but by keeping it in
place moving the planets' clock forward, relativity restricting how much
affect that has on the rest of the universe

> In trying to tickle this bug out of hiding I went back to my old Windows
> box and found another, more subtle one. It turns out that on Windows 98,
> least in my setup (JDK1.3.1_03), Java is unable to affect the timestamp on
> a directory. Because of this a depend test that includes a test on a
> directory timestamp is returning the wrong value. All other platforms I've
> encountered (including apparently NT, since Magesh did not encounter an
> error with depend testing) can change the timestamp on a directory without
> a problem. For now, I'll just ignore the return value from the directory
> that test.
> I've attached a patch for both these issues. Magesh, perhaps you could
> this with your setup once you've had a chance to catch your breath after
> releasing Beta 2. Please don't hold Beta 2 on account of this, I don't
> think that anything here is that critical in my opinion.

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

View raw message