ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: preprocessing java source
Date Wed, 11 Sep 2002 16:24:43 GMT

----- Original Message -----
From: "Laurie Harper" <>
To: "Ant Developers List" <>
Sent: Tuesday, September 10, 2002 5:11 PM
Subject: Re: preprocessing java source

> On 9/9/02 1:04 PM, "Steve Loughran" <> wrote:
> > but assert ; is a special's nice to have them, yet the moment
> > use them you are bound to 1.4. Jon Skeet was bouncing round the idea of
> > doing jar fixup though...
> Yep, but you can use something like Junit to get most of the benefits JDK
> 1.4's assertion keyword gives you.

but not in running code. If I use assert I can assert invariant pre- and
post- conditions about core data structures in my code, ones that get
checked on any production build. Junit is good for unit tests, assert lets
you verify that invariants hold in a running system. I admit I may be odd
here, having a background in formal methods, and not being above proving
concurrency relationships hold in class that I then opt not to synchronize
blindly on the basis that a proof is adequate (yes, that is a maintenance
nightmare, but it boosts performance).

There is an <icontract> preprocessor for ant to go from @pre and @post
javadoc conditions to code, and of course add 'design by contract' is a
popular java RFE, so maybe i am not alone. I'd like it if icontract
generated assert statements...


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

View raw message