[HtmlUnit] SVN: [15508] trunk/htmlunit/src

rbri--- via HtmlUnit-develop <[email protected]> Thu, 02 Aug 2018 18:30:13 +0000
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15508
          http://sourceforge.net/p/htmlunit/code/15508
Author:   rbri
Date:     2018-08-02 18:30:12 +0000 (Thu, 02 Aug 2018)
Log Message:
-----------
Add missing default delegating methods getContentLength(), cleanUp(), and defaultCharsetUtf8() to WebResponseWrapper

Issue 1978

Modified Paths:
--------------
    trunk/htmlunit/src/changes/changes.xml
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java

Modified: trunk/htmlunit/src/changes/changes.xml
===================================================================
--- trunk/htmlunit/src/changes/changes.xml	2018-08-02 17:53:13 UTC (rev 15507)
+++ trunk/htmlunit/src/changes/changes.xml	2018-08-02 18:30:12 UTC (rev 15508)
@@ -8,6 +8,10 @@
 
     <body>
         <release version="2.33" date="xxxx, 2018" description="Bugfixes">
+            <action type="fix" dev="rbri" issue="1978" due-to="Atsushi Nakagawa">
+                Add missing default delegating methods getContentLength(), cleanUp(), and defaultCharsetUtf8()
+                to WebResponseWrapper.
+            </action>
             <action type="update" dev="rbri">
                 Major cleanup for neko and switch to xerces 2.12.0
             </action>

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java	2018-08-02 17:53:13 UTC (rev 15507)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java	2018-08-02 18:30:12 UTC (rev 15508)
@@ -31,6 +31,7 @@
  * @author Marc Guillemot
  * @author Ahmed Ashour
  * @author Ronald Brill
+ * @author Atsushi Nakagawa
  */
 public class WebResponseWrapper extends WebResponse {
 
@@ -51,6 +52,15 @@
 
     /**
      * {@inheritDoc}
+     * The default behavior of this method is to return getContentLength() on the wrapped webResponse object.
+     */
+    @Override
+    public long getContentLength() {
+        return wrappedWebResponse_.getContentLength();
+    }
+
+    /**
+     * {@inheritDoc}
      * The default behavior of this method is to return getContentAsStream() on the wrapped webResponse object.
      */
     @Override
@@ -166,4 +176,22 @@
     public WebRequest getWebRequest() {
         return wrappedWebResponse_.getWebRequest();
     }
+
+    /**
+     * {@inheritDoc}
+     * The default behavior of this method is to call cleanUp() on the wrapped webResponse object.
+     */
+    @Override
+    public void cleanUp() {
+        wrappedWebResponse_.cleanUp();
+    }
+
+    /**
+     * {@inheritDoc}
+     * The default behavior of this method is to call defaultCharsetUtf8() on the wrapped webResponse object.
+     */
+    @Override
+    public void defaultCharsetUtf8() {
+        wrappedWebResponse_.defaultCharsetUtf8();
+    }
 }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot