replace assert by throw new AssertionError
aulakh3333 at gmail.com
Tue Oct 2 18:02:41 PDT 2007
Are you part of the sun JAVA group or Open JDK( developing own javac from
ground up) ?
On 10/2/07, Jonathan Gibbons <Jonathan.Gibbons at sun.com> wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the compiler-dev