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?
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.
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.