This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assertions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Assertions" Watch "Assertions" New topic


Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

The Java language guide to assertions mentions in design FAQs(
3. Why does setClassAssertionStatus return a boolean instead of throwing an exception if it is invoked when it's too late to set the assertion status (that is, if the named class has already been initialized)?
No action (other than perhaps a warning message) is necessary or desirable if it's too late to set the assertion status. An exception seems unduly heavyweight.
But as per JDK 1.4 API documentation(, boolean)) - the method setClassAssertionStatus return void and not a boolean.
Looks like a documentation error from Sun, has anyone noticed/reported this?
- Manish
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
Bug #4392034 has been fixed

[Blog] [Blogroll] [My Reviews] My Linked In
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

The bug parade indeed says it has been fixed, but I just visited the link -
that I had included in the previous post, and the documentation still says it returns a boolean. I wonder what has been fixed?
I did send a mail abt it to Sun a few days agao, but no reply from them. Perhaps, they believe it has been fixed, since the bug parade says so.
- Manish
[ August 26, 2002: Message edited by: Manish Hatwalne ]
It is sorta covered in the JavaRanch Style Guide.
subject: Assertions
It's not a secret anymore!