Author: violetagg
Date: Thu Mar 14 15:43:05 2013
New Revision: 1456489

URL: http://svn.apache.org/r1456489
Log:
Merged revision 1456440 from tomcat/trunk:
Fix the recycling of the o.a.t.u.buf.UEncoder.output field. 
Fix javadoc. 
Add a test case.

Added:
    tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/buf/TestUEncoder.java
      - copied unchanged from r1456440, 
tomcat/trunk/test/org/apache/tomcat/util/buf/TestUEncoder.java
Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/UEncoder.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1456440

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/UEncoder.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/UEncoder.java?rev=1456489&r1=1456488&r2=1456489&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/UEncoder.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/UEncoder.java Thu Mar 
14 15:43:05 2013
@@ -58,9 +58,12 @@ public final class UEncoder {
     }
 
 
-    /** URL Encode string, using a specified encoding.
+   /**
+    * URL Encode string, using a specified encoding.
     *
     * @param s string to be encoded
+    * @param start the beginning index, inclusive
+    * @param end the ending index, exclusive
     * @throws IOException If an I/O error occurs
     */
    public CharChunk encodeURL(String s, int start, int end)
@@ -73,6 +76,7 @@ public final class UEncoder {
        } else {
            bb.recycle();
            cb.recycle();
+           output.recycle();
        }
 
        for (int i = start; i < end; i++) {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1456489&r1=1456488&r2=1456489&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Mar 14 15:43:05 2013
@@ -66,6 +66,10 @@
         bootstrap class loader is not an ancestor of the web application class
         loader such as OSGi environments. (violetagg)
       </fix>
+      <fix>
+        Ensure that, if a call to UEncoder#encodeURL is made, all internal
+        structures are properly cleaned. (violetagg)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to