jkesselm    02/05/16 11:29:21

  Modified:    java/src/org/apache/xalan/templates ElemTemplateElement.java
  Log:
  Dumb of me -- fixed one edge case and created another, because
  I forgot about subclassing Sigh. This version protects against both.
  
  (And whitens your laundry, and keeps your car from rusting, and
  kills crabgrass... It's a furnature wax! It's a dessert topping! ... Sorry.)
  
  Revision  Changes    Path
  1.52      +4 -3      
xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java
  
  Index: ElemTemplateElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- ElemTemplateElement.java  15 May 2002 20:47:12 -0000      1.51
  +++ ElemTemplateElement.java  16 May 2002 18:29:21 -0000      1.52
  @@ -217,7 +217,7 @@
      */
     public Stylesheet getStylesheet()
     {
  -    return m_parentNode.getStylesheet();
  +    return (null==m_parentNode) ? null : m_parentNode.getStylesheet();
     }
   
     /**
  @@ -791,7 +791,8 @@
      */
     public String getSystemId()
     {
  -    return (null != m_parentNode) ? this.getStylesheet().getHref() : null;
  +    Stylesheet sheet=getStylesheet();
  +    return (sheet==null) ? null : sheet.getHref();
     }
   
     /**
  @@ -1674,5 +1675,5 @@
        callChildVisitors(visitor, true);
     }
   
  -
  +
   }
  
  
  

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

Reply via email to