You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/08/09 16:55:46 UTC

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java

remm        2003/08/09 07:55:46

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        JspDocumentParser.java
  Log:
  - pop is called in the same order as push, so using a stack is not correct.
    A linked list should be used instead.
  
  Revision  Changes    Path
  1.63      +9 -10     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
  
  Index: JspDocumentParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- JspDocumentParser.java	8 Aug 2003 22:22:09 -0000	1.62
  +++ JspDocumentParser.java	9 Aug 2003 14:55:46 -0000	1.63
  @@ -109,7 +109,7 @@
       private boolean isTagFile;
       private boolean directivesOnly;
       private boolean isTop;
  -    private Stack prefixMapStack;
  +    private LinkedList prefixMapLinkedList;
   
       /*
        * Constructor
  @@ -128,7 +128,7 @@
   	this.isTagFile = isTagFile;
   	this.directivesOnly = directivesOnly;
   	this.isTop = true;
  -        this.prefixMapStack = new Stack();;
  +        this.prefixMapLinkedList = new LinkedList();;
       }
   
       /*
  @@ -560,10 +560,9 @@
           if (taglibInfo != null) {
               pageInfo.addTaglib(uri, taglibInfo);
               pageInfo.pushPrefixMapping(prefix, uri);
  -            prefixMapStack.push(new Boolean(true));
  -	}
  -        else {
  -            prefixMapStack.push(new Boolean(false));
  +            prefixMapLinkedList.addLast(new Boolean(true));
  +        } else {
  +            prefixMapLinkedList.addLast(new Boolean(false));
           }
        }
   
  @@ -571,7 +570,7 @@
         * Receives notification of the end of a Namespace mapping. 
         */
       public void endPrefixMapping(String prefix) throws SAXException {
  -        if (((Boolean)prefixMapStack.pop()).booleanValue()) {
  +        if (((Boolean) prefixMapLinkedList.removeFirst()).booleanValue()) {
               pageInfo.popPrefixMapping(prefix);
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org