This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one 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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Assertions" Watch "Assertions" New topic


Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2581

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: 2581

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 ]
subject: Assertions