You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/11/27 00:02:40 UTC
DO NOT REPLY [Bug 5103] New: -
MalformedURLException:NullPointerException occurs parsing doc
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: xerces-j-dev@xml.apache.org
ReportedBy: lauzon@us.ibm.com
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org