ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: Why stop at JDK1.2? Only semi-serious question...
Date Mon, 15 Jul 2002 18:10:53 GMT

----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>
To: "'Ant Developers List'" <ant-dev@jakarta.apache.org>
Sent: Monday, July 15, 2002 9:35 AM
Subject: RE: Why stop at JDK1.2? Only semi-serious question...


> You can still emulate this by wrapping all your assert's in an
>
> if (RELEASE) {
>   assert ...;
> }
>
> with RELEASE a static final boolean... --DD

...but only with code that is to compile onto 1.4. With macros we could
strip them out the source.

the alternate approach is to have @pre and @post conditons in the javadocs
and have something autoinsert them into the source at compile time.

>
> -----Original Message-----
> From: Steve Loughran [mailto:steve_l@iseran.com]
> Sent: Sunday, July 14, 2002 1:58 PM
> To: Ant Developers List
> Subject: Re: Why stop at JDK1.2? Only semi-serious question...
>
> Nice idea though about an assert stripper at build time; I belive C had
such
> a thing a long time ago
>
> #ifdef RELEASE
> #define ASSERT(fact)
> #else
> #define ASSERT(fact) _assert(fact,_FILE_,_LINE _)
> #endif
>
> or something thereabouts :)
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message