Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Assertion - what are system classes?

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

What exactly are the system classes?

K&B says the �java �ea or �da� switches without arguments will enable or disable assertions in all classes, except for the system classes.

The book also says �java �ea �dsa� will enable assertions in general, but disable assertions in system classes.

I�m not seeing why �dsa is needed since it looks like the only why to enable the system classes� assertions is with the �esa switch. Also in what scenario(s) would the system classes� assertions need to be enabled by anyone other than a developer developing a system class?

Thanks, Richard
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm.. did puzzle me as well when i read it.
However, "java �ea �dsa" "java -ea" seem to be doing the same thing.

Developers did add logging statements even if they never anticipated a given scenario to occur. This would always be compiled and was added code.

Assertions are generally used by developers to debug their code, hence system assertions make sense (but you would rarely want to enable them, unless you expect a bugs in sun's code). At deployment you turn it off, which means that you don't have additional code.
 
Richard Boren
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By system classes are they talking about the core API's?

Richard
 
swarna dasa
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats how i looked at it. What do you think?
 
Richard Boren
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess so. I did read this on www.oopsla.org "...the standard class libraries, also known as system classes,..." I assume java uses the API packages for -esa and -dsa.

Richard
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic