This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
RE: A java DEBUG flag
- To: "'burton at relativity dot yi dot org'" <burton at relativity dot yi dot org>, Brian Jones <cbj at gnu dot org>
- Subject: RE: A java DEBUG flag
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Wed, 29 Nov 2000 10:19:57 -0800
- Cc: java-discuss at sources dot redhat dot com, classpath at gnu dot org
> 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