Author: yoavs
Date: Sat Oct 15 22:20:30 2005
New Revision: 322451

URL: http://svn.apache.org/viewcvs?rev=322451&view=rev
Log:
Bugzilla 35252: http://issues.apache.org/bugzilla/show_bug.cgi?id=35252

Modified:
    
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/PageDataImpl.java

Modified: 
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/PageDataImpl.java
URL: 
http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/PageDataImpl.java?rev=322451&r1=322450&r2=322451&view=diff
==============================================================================
--- 
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/PageDataImpl.java
 (original)
+++ 
tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/PageDataImpl.java
 Sat Oct 15 22:20:30 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -204,15 +204,21 @@
        private void addAttributes(Attributes attrs) {
            if (attrs != null) {
                int len = attrs.getLength();
+
                for (int i=0; i<len; i++) {
-                   if ("version".equals(attrs.getQName(i))) {
+                    String qName = attrs.getQName(i);
+                   if ("version".equals(qName)) {
                        continue;
                    }
-                   rootAttrs.addAttribute(attrs.getURI(i),
-                                          attrs.getLocalName(i),
-                                          attrs.getQName(i),
-                                          attrs.getType(i),
-                                          attrs.getValue(i));
+
+                    // Bugzilla 35252: 
http://issues.apache.org/bugzilla/show_bug.cgi?id=35252
+                    if(rootAttrs.getIndex(qName) == -1) {
+                        rootAttrs.addAttribute(attrs.getURI(i),
+                                               attrs.getLocalName(i),
+                                               qName,
+                                               attrs.getType(i),
+                                               attrs.getValue(i));
+                    }
                }
            }
        }



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

Reply via email to