You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Yuri de Wit <yu...@metaserver.com> on 2004/02/12 20:04:08 UTC

Xalan code calling System.exit()

All,

We found 2 classes in the Xalan 2.4.1 sources (not considering xsltc
sources) that are dangerously calling System.exit(). 
These classes are:
 - org.apache.xml.dtm.ref.sax2dtm.SAX2DTM 
 - org.apache.xml.dtm.DTMDefaultBase

Looking at the source, these System.exit() calls seem to be innofensive for
normal conditions, but in unpredictable situations such as StackOverflow
exceptions how one can garantee they wont be invoked. I wouldnt like to see
a whole JVM going down without logs/traces when those conditions are hit.

Could they be cleanedup from Xalan sources in subsequent releases and maybe
runtime exceptions thrown in its place?

Thanks,

Yuri

PS: 


Re: Xalan code calling System.exit()

Posted by Joseph Kesselman <ke...@us.ibm.com>.



The one in SAX2DTM.java should never arise. As the error message and
comments indicate, it only happens if there's a coding bug elsewhere in
Xalan.

The one in DTMDefaultBase.java is in a developer's debugging routine, which
is never invoked in normal operation.

We could and probably should replace these with unrecoverable-failure
exceptions... but given that they should never actually be invoked, I'd
consider that a low-priority item.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk