mmidy       00/11/20 09:48:49

  Modified:    src/org/apache/xalan/xslt Stylesheet.java
                        StylesheetRoot.java
  Log:
  Fix weird initialization problem. Apparently a method was getting called 
before member variables were initialized.
  
  Revision  Changes    Path
  1.38      +10 -1     xml-xalan/src/org/apache/xalan/xslt/Stylesheet.java
  
  Index: Stylesheet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/Stylesheet.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Stylesheet.java   2000/11/03 22:39:18     1.37
  +++ Stylesheet.java   2000/11/20 17:48:49     1.38
  @@ -549,7 +549,16 @@
     {
       m_stylesheetRoot = root;
       m_baseIdent = baseIdentifier;
  -    init(processor);
  +             
  +             // If the root is null, it means this is a 
  +             // StylesheetRoot object, and the derived Stylesheet 
  +             // root constructor should call init, after all the 
  +             // member variable initialization for the derived class 
  +             // is complete.  If you call init from here for a stylesheet 
  +             // root, the member variable initialization will (may?) be 
  +             // called after init has run, which is a bad thing.
  +             if(null != root)
  +                     init(processor);
     }
   
     /**
  
  
  
  1.38      +1 -0      xml-xalan/src/org/apache/xalan/xslt/StylesheetRoot.java
  
  Index: StylesheetRoot.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/StylesheetRoot.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- StylesheetRoot.java       2000/09/07 22:21:10     1.37
  +++ StylesheetRoot.java       2000/11/20 17:48:49     1.38
  @@ -186,6 +186,7 @@
              SAXException
     {
       super(null, processor, baseIdentifier);
  +             init(processor);
     }
   
     /**
  
  
  

Reply via email to