You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/08/07 23:32:57 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/templates Stylesheet.java

sboag       00/08/07 14:32:57

  Modified:    java/src/org/apache/xalan/templates Stylesheet.java
  Log:
  Defensive check for null locator.
  
  Revision  Changes    Path
  1.4       +15 -12    xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java
  
  Index: Stylesheet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Stylesheet.java	2000/07/05 14:40:27	1.3
  +++ Stylesheet.java	2000/08/07 21:32:57	1.4
  @@ -979,22 +979,25 @@
      */
     public void setLocaterInfo(Locator locator)
     {
  -    m_publicId = locator.getPublicId();
  -    m_systemId = locator.getSystemId();
  -    
  -    if(null != m_systemId)
  +    if(null != locator)
       {
  -      try
  +      m_publicId = locator.getPublicId();
  +      m_systemId = locator.getSystemId();
  +      
  +      if(null != m_systemId)
         {
  -        m_href = SystemIDResolver.getAbsoluteURI(m_systemId, null);
  +        try
  +        {
  +          m_href = SystemIDResolver.getAbsoluteURI(m_systemId, null);
  +        }
  +        catch(SAXException se)
  +        {
  +          // Ignore this for right now
  +        }
         }
  -      catch(SAXException se)
  -      {
  -        // Ignore this for right now
  -      }
  +      
  +      super.setLocaterInfo(locator);
       }
  -    
  -    super.setLocaterInfo(locator);
     }