cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: xml-cocoon2/src/blocks/proxy/java/org/apache/cocoon/generation HttpProxyGenerator.java
Date Tue, 18 Feb 2003 14:47:44 GMT
pier        2003/02/18 06:47:44

  Modified:    src/blocks/proxy/java/org/apache/cocoon/generation
                        HttpProxyGenerator.java
  Log:
  More javadoc and one small performance fix.
  
  Revision  Changes    Path
  1.2       +14 -2     xml-cocoon2/src/blocks/proxy/java/org/apache/cocoon/generation/HttpProxyGenerator.java
  
  Index: HttpProxyGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/blocks/proxy/java/org/apache/cocoon/generation/HttpProxyGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpProxyGenerator.java	11 Feb 2003 02:47:50 -0000	1.1
  +++ HttpProxyGenerator.java	18 Feb 2003 14:47:43 -0000	1.2
  @@ -138,11 +138,23 @@
           return (list);
       }
   
  +    /**
  +     * Override the value for a named parameter in a specfied <code>ArrayList</code>
  +     * or add it if the parameter was not found.
  +     *
  +     * @param list The <code>ArrayList</code> where the parameter is stored.
  +     * @param name The parameter name.
  +     * @param list The new parameter value.
  +     * @return The same <code>List</code> of <code>NameValuePair</code>
elements.
  +     */
       private ArrayList overrideParams(ArrayList list, String name, String value) {
           Iterator iterator = list.iterator();
           while (iterator.hasNext()) {
               NameValuePair param = (NameValuePair) iterator.next();
  -            if (param.getName().equals(name)) iterator.remove();
  +            if (param.getName().equals(name)) {
  +                iterator.remove();
  +                break;
  +            }
           }
           list.add(new NameValuePair(name, value));
           return (list);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message