• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Assertions

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java language guide to assertions mentions in design FAQs(http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html#design-faq-enable-disable)
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(http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html#setClassAssertionStatus(java.lang.String, boolean)) - the method setClassAssertionStatus return void and not a boolean.
Looks like a documentation error from Sun, has anyone noticed/reported this?
- Manish
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bug #4392034 has been fixed
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange!!
The bug parade indeed says it has been fixed, but I just visited the link -http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html#design-faq-enable-disable
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 ]
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic