replace assert by throw new AssertionError

Jesse Glick jesse.glick at sun.com
Wed Oct 3 14:10:02 PDT 2007


Jonathan Gibbons wrote:
> javac currently contains assertion statements, and goes out of its
> way to ensure assertions are enabled.

Why? Wouldn't non-javac developers just want it to run as fast as 
possible and trust that it is not buggy? You can always use -J-ea to 
enable assertions if you want to be sure, right?

-J.

-- 
jesse.glick at sun.com  netbeans.org  ant.apache.org  hudson.dev.java.net
             http://google.com/search?q=e%5E%28pi*i%29%2B1




More information about the compiler-dev mailing list