[ mx4j-Bugs-1594739 ] fix for NPE in XSLProcessor.getInputStream

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #1594739, was opened at 2006-11-11 08:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1594739&group_id=47745

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HTTP Adaptor
Group: Release 3.0.2
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jeffrey Fredrick (jfredrick)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix for NPE in XSLProcessor.getInputStream

Initial Comment:
in getInputStream(String path) there's a block of code that reads:

         if (file == null)
         {
            ClassLoader cl = getClass().getClassLoader();
            if (cl == null)
            {
               file = ClassLoader.getSystemClassLoader().getResourceAsStream
(targetFile);
            }
            else
            {
               file = getClass().getClassLoader().getResourceAsStream
(targetFile);
            }
            file = getClass().getClassLoader().getResourceAsStream
(targetFile);
         }

the problem is the last attempt to assign the file (line 363) is erroneous 
and will cause an NPE whenever getClass().getClassLoader() returns null.  
Looks like someone tried to fix this bug, added the code to handle the 
null case, but forgot to remove the original line.

in my local code I've removed the offending line and then the code works 
as expected.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1594739&group_id=47745

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.