DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5103>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5103

MalformedURLException:NullPointerException occurs parsing doc

           Summary: MalformedURLException:NullPointerException occurs
                    parsing doc
           Product: Xerces2-J
           Version: 2.0.0 [beta 3]
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DTD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Looks to me the problem is in XMLEntityManager, line 719:

String expandedSystemId = expandSystemId(systemId, baseSystemId);
if (baseSystemId == null) {
     baseSystemId = expandedSystemId;
}
stream = new URL(expandedSystemId).openStream();

If systemId is null, then expandSystemId() returns null, and the URL creation 
fails. It doesn't make sense to check baseSystemId after it's already been 
used. So I think the code should really be as follows:

String expandedSystemId = expandSystemId(systemId, baseSystemId);
if (expandedSystemId == null) {
     expandedSystemId = baseSystemId;
}
stream = new URL(expandedSystemId).openStream();

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to