replace assert by throw new AssertionError

navroop singh aulakh3333 at gmail.com
Tue Oct 2 18:02:41 PDT 2007


Hey guys

Are you part of the sun JAVA group or Open JDK( developing own javac from
ground up) ?


Thanks


On 10/2/07, Jonathan Gibbons <Jonathan.Gibbons at sun.com> wrote:
>
> Team,
>
> javac currently contains assertion statements, and goes out of its way
> to ensure assertions are enabled.
> As such, it would seem better to replace "assert cond: expr" with "if
> (!cond) throw new AssertionError(expr)".
> Then we could remove the code from all the places where we force
> assertions to be enabled for javac.
> Does anyone have comments, especially any reasons why this would *not*
> be a good idea?
>
> -- Jon
>



-- 
thanks
navroop singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20071002/fa029828/attachment.html 


More information about the compiler-dev mailing list