A java DEBUG flag

Boehm, Hans hans_boehm@hp.com
Wed Nov 29 10:20:00 GMT 2000


> This is in the SUN Assertion JSR.
> http://java.sun.com/aboutJava/communityprocess/jsr/asrt_prop.html
> 
> ... The documentation is public but we certainly can not 
> participate in its
> development because of SUNs *stupid* IP restrictions in the 
> JCP.  There are good
> ideas here though and since this stuff will eventually make 
> it into JDK 1.4 I
> would say it should eventually belong here.
> 
True.  But isn't this an awfully weak proposal?  It doesn't seem to allow me
to cleanly compute additional state that's used only in assertion checking.
I find that I need to do that all the time in order to be able to write
reasonable assertions.  For example, I might explicitly keep track of who
holds a particular lock, so that I can assert that I hold it at some point.
Or I might need to count opened files so that I can assert that I closed
everything I opened in a certain section of code.  Or ...

Hans


More information about the Java mailing list