You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by na...@locus.apache.org on 2000/08/11 00:39:25 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/xml XmlMapper.java

nacho       00/08/10 15:39:24

  Modified:    src/share/org/apache/tomcat/util/xml XmlMapper.java
  Log:
  Check for nulls in resolve
  Entity.
  
  Thanks to C. Jason Benedict [jbenedict@Q4i.com]
  
  Revision  Changes    Path
  1.27      +9 -0      jakarta-tomcat/src/share/org/apache/tomcat/util/xml/XmlMapper.java
  
  Index: XmlMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/xml/XmlMapper.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XmlMapper.java	2000/07/07 12:00:00	1.26
  +++ XmlMapper.java	2000/08/10 22:39:24	1.27
  @@ -406,6 +406,15 @@
       public InputSource resolveEntity(String publicId, String systemId)
   	throws SAXException
       {
  +        if(publicId == null) {
  +           log("publicID is 'null'");
  +           return null;
  +        }
  +        
  +        if(systemId == null) {
  +           log("systemId is 'null'");
  +           return null;
  +        }
   	String dtd = (String) fileDTDs.get(publicId);
   	if( dtd != null ) {
   	    File dtdF=new File( dtd );