tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfarc...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationHttpRequest.java
Date Wed, 21 May 2003 19:04:03 GMT
jfarcand    2003/05/21 12:04:03

  Modified:    catalina/src/share/org/apache/catalina/core
                        ApplicationHttpRequest.java
  Log:
  Fix java.lang.UnsupportedOperationException (seems the Set doesn't support adding new element).
  
  Revision  Changes    Path
  1.7       +12 -8     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java
  
  Index: ApplicationHttpRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ApplicationHttpRequest.java	15 May 2003 18:01:40 -0000	1.6
  +++ ApplicationHttpRequest.java	21 May 2003 19:04:03 -0000	1.7
  @@ -227,13 +227,17 @@
        * request.
        */
       public Enumeration getAttributeNames() {
  -
  -        Set keySet = attributes.keySet();
  +        
  +        HashMap clone = (HashMap)attributes.clone();
           Enumeration enum = getRequest().getAttributeNames();
  +        Object key;
           while(enum.hasMoreElements()){
  -            keySet.add(enum.nextElement());
  +            key = enum.nextElement();
  +            if (!clone.containsKey(key)){
  +                clone.put(key, getRequest().getAttribute(key.toString()));
  +            }
           }
  -        return (new Enumerator(keySet));
  +        return (new Enumerator(clone.keySet()));
   
       }
   
  
  
  

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


Mime
View raw message