geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1037107 - in /geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper: compiler/Parser.java util/UniqueAttributesImpl.java
Date Sat, 20 Nov 2010 02:53:53 GMT
Author: genspring
Date: Sat Nov 20 02:53:53 2010
New Revision: 1037107

URL: http://svn.apache.org/viewvc?rev=1037107&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=49297, the tag directive should also be
applied the same logic of page directive according to spec.

Modified:
    geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/compiler/Parser.java
    geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/util/UniqueAttributesImpl.java

Modified: geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/compiler/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/compiler/Parser.java?rev=1037107&r1=1037106&r2=1037107&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/compiler/Parser.java
(original)
+++ geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/compiler/Parser.java
Sat Nov 20 02:53:53 2010
@@ -152,8 +152,8 @@ class Parser implements TagConstants {
     Attributes parseAttributes() throws JasperException {
         return parseAttributes(false);
     }
-    Attributes parseAttributes(boolean pageDirective) throws JasperException {
-        UniqueAttributesImpl attrs = new UniqueAttributesImpl(pageDirective);
+    Attributes parseAttributes(boolean pageOrTagDirective) throws JasperException {
+        UniqueAttributesImpl attrs = new UniqueAttributesImpl(pageOrTagDirective);
 
         reader.skipSpaces();
         int ws = 1;
@@ -572,7 +572,7 @@ class Parser implements TagConstants {
      * Attribute)*
      */
     private void parseTagDirective(Node parent) throws JasperException {
-        Attributes attrs = parseAttributes();
+        Attributes attrs = parseAttributes(true);
         Node.TagDirective n = new Node.TagDirective(attrs, start, parent);
 
         /*

Modified: geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/util/UniqueAttributesImpl.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/util/UniqueAttributesImpl.java?rev=1037107&r1=1037106&r2=1037107&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/util/UniqueAttributesImpl.java
(original)
+++ geronimo/external/trunk/tomcat-parent-7.0.0/jasper/src/main/java/org/apache/jasper/util/UniqueAttributesImpl.java
Sat Nov 20 02:53:53 2010
@@ -32,15 +32,15 @@ public class UniqueAttributesImpl extend
     private static final String IMPORT = "import";
     private static final String PAGE_ENCODING = "pageEncoding";
     
-    private final boolean pageDirective;
+    private final boolean pageOrTagDirective;
     private final Set<String> qNames = new HashSet<String>();
 
     public UniqueAttributesImpl() {
-        this.pageDirective = false;
+        this.pageOrTagDirective = false;
     }
 
-    public UniqueAttributesImpl(boolean pageDirective) {
-        this.pageDirective = pageDirective;
+    public UniqueAttributesImpl(boolean pageOrTagDirective) {
+        this.pageOrTagDirective = pageOrTagDirective;
     }
 
     @Override
@@ -93,7 +93,7 @@ public class UniqueAttributesImpl extend
     }
 
     private void handleDuplicate(String qName, String value) {
-        if (pageDirective) {
+        if (pageOrTagDirective) {
             if (IMPORT.equalsIgnoreCase(qName)) {
                 // Always merge imports
                 int i = super.getIndex(IMPORT);



Mime
View raw message