cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26445] - NPE at o.a.xalan.transformer.TransformerImpl.java:1497
Date Tue, 09 Mar 2004 00:27:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26445>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26445

NPE at o.a.xalan.transformer.TransformerImpl.java:1497





------- Additional Comments From KajKandler@conficio.com  2004-03-09 00:27 -------
Hi Joerg, 
I want to apologize, to not test and respond further to my own problem. I'm too 
busy on other fronts. I did circumvent the issue for myself, by not following 
any links in the offline generation and adding any URL myself (and copying all 
other resources by hand). But I try to do my best to improve these great 
products cocoon and xalan. 
 
Having a QA background, I can tell you the Xalan 2.6.0 patch does not solve the 
issue, but what to do about the NPE. 
 
    Vector vars = sroot.getVariablesAndParamsComposed(); 
    int i = vars.size(); 
 
The function getVariablesAndParamsComposed(); must have a contract, either 
saying it returns sometimes null, then the rest of vars.size() should not be 
executed. Or it has a contract that always ensures the existence of this 
Vector, than it should behave like this. I guess a new Vector could should be 
initialized by the (access)-method getVariablesAndParamsComposed(); instead of 
returning null 9or otherwise ensure in that object it is always created, 
because I would not know what to do in this setParameter() method otherwise --> 
would have to throw an exception with no recoverable meaning (the internal 
error type :-(( ). 
 
Again, I'm sorry to let you do all the debugging here. Would you be able to 
propose this change to the Xalan people or open an appropriate case there? I 
could do it to, but you have now dug into the code.  
 
Thanks, I'd really appreciate it. However I won't be angry if you don't. 
 
Kaj 
P.S.: I do not agree with "The NPE is a runtime exception, so there is no must 
of handling it.". An NPE should never occur and sometimes it is very helpful to 
handle such exceptions, to deliver some context in an error message (like what 
parameter is set and what is the value - which might give me a starting point 
to blame my style-sheet) and then re-throw the exception. I agree with the rest 
of your comment that this is difficult, as it is another library that crashes. 
But it would be a defensive programming strategy. Sorry for the lecture, may be 
I have worked in QA for too long? 
 
--- 
Do you have a Plan-B? 
http://www.conficio.com/

Mime
View raw message