Hi Mike,

I have attached the DateUtils class so you can have a closer look at the
ImmutableDate embedded class.

JUnit tests are very easy to write. Look at the simple example attached.

Best regards,
Jerome


-----Message d'origine-----
De : news [mailto:[EMAIL PROTECTED] De la part de Mike Brzozowski
Envoye : mercredi 28 mai 2008 20:41
A : [email protected]
Objet : Re: Possible bug in DateUtils.ImmutableDate

> Regarding the conditional GET support, is there any reason why you don't
> rely on the built-in support that we provide for Resource subclasses?

I wasn't aware this support was built-in... is there documentation somewhere
for this? All I needed was to be able to set the Last Modified header and
check for If-Modified-Since. I found how to configure this in the FileClient
but not for dynamically generated resources.

> For immutable dates, something strange is that we also override after() in
> the ImmutableDate and delegate it as well. So everything is processed by
the
> same delegate Date instance... 

I believe from tracing into the code that java.util.Date.after() doesn't
call
any methods on the target Date, it just reaches directly into its instance
fields.

> Could you write a simple unit test illustrating the issue and attach it to
a
> new bug report?

I've never written a unit test, but it's probably high time I learned. Do
you
use JUnit?

Thanks, Mike

Attachment: DateUtils.java
Description: Binary data

Attachment: ByteUtilsTestCase.java
Description: Binary data

Reply via email to