xml-xalan-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mk...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java
Date Wed, 15 Oct 2003 18:08:32 GMT
mkwan       2003/10/15 11:08:31

  Modified:    java/src/org/apache/xalan/xsltc/dom Tag: xslt20-compiled
                        SAXImpl.java
  Log:
  Propagate the fix for bug 23115 to xslt20-compiled.
  
  Fix SAXImpl.makeNode(int).
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.8.2.1   +25 -9     xml-xalan/java/src/org/apache/xalan/xsltc/dom/SAXImpl.java
  
  Index: SAXImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/SAXImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- SAXImpl.java	23 Jun 2003 15:58:18 -0000	1.8
  +++ SAXImpl.java	15 Oct 2003 18:08:31 -0000	1.8.2.1
  @@ -290,9 +290,17 @@
               _nodes = new Node[_namesSize];
           }
   
  -        return (_nodes[index] != null)
  -                    ? _nodes[index]
  -                    : (_nodes[index] = new DTMNodeProxy((DTM)this, index));
  +        int nodeID = makeNodeIdentity(index);
  +        if (nodeID < 0) {
  +            return null;
  +        }
  +        else if (nodeID < _nodes.length) {
  +            return (_nodes[nodeID] != null) ? _nodes[nodeID] 
  +                : (_nodes[nodeID] = new DTMNodeProxy((DTM)this, index));
  +        }
  +        else {
  +            return new DTMNodeProxy((DTM)this, index);
  +        }
       }
   
       /**
  @@ -310,11 +318,19 @@
           if (_nodeLists == null) {
               _nodeLists = new NodeList[_namesSize];
           }
  -        return (_nodeLists[index] != null)
  -                 ? _nodeLists[index]
  -                 : (_nodeLists[index] =
  -                         new DTMAxisIterNodeList(this,
  -                                                 new SingletonIterator(index)));
  +        
  +        int nodeID = makeNodeIdentity(index);
  +        if (nodeID < 0) {
  +            return null;
  +        }
  +        else if (nodeID < _nodeLists.length) {
  +            return (_nodeLists[nodeID] != null) ? _nodeLists[nodeID]
  +                   : (_nodeLists[nodeID] = new DTMAxisIterNodeList(this,
  +                                                  new SingletonIterator(index)));
  +        }
  +        else {
  +            return new DTMAxisIterNodeList(this, new SingletonIterator(index));
  +        }
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message