Quantcast

[HtmlUnit] SVN: [14151] trunk/htmlunit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[HtmlUnit] SVN: [14151] trunk/htmlunit

asashour-2
Revision: 14151
          http://sourceforge.net/p/htmlunit/code/14151
Author:   asashour
Date:     2017-04-21 14:20:56 +0000 (Fri, 21 Apr 2017)
Log Message:
-----------
Fix dependencies, and deprecation warnings

Modified Paths:
--------------
    trunk/htmlunit/pom.xml
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest2.java

Modified: trunk/htmlunit/pom.xml
===================================================================
--- trunk/htmlunit/pom.xml 2017-04-21 14:01:56 UTC (rev 14150)
+++ trunk/htmlunit/pom.xml 2017-04-21 14:20:56 UTC (rev 14151)
@@ -939,6 +939,10 @@
                     <groupId>net.sourceforge.htmlunit</groupId>
                     <artifactId>htmlunit</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
@@ -951,6 +955,10 @@
                     <groupId>org.apache.httpcomponents</groupId>
                     <artifactId>httpclient</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
@@ -958,6 +966,12 @@
             <artifactId>selenium-firefox-driver</artifactId>
             <version>3.4.0</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.seleniumhq.selenium</groupId>
@@ -964,6 +978,12 @@
             <artifactId>selenium-chrome-driver</artifactId>
             <version>3.4.0</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.seleniumhq.selenium</groupId>
@@ -970,6 +990,12 @@
             <artifactId>selenium-edge-driver</artifactId>
             <version>3.4.0</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.tmatesoft.svnkit</groupId>

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java 2017-04-21 14:01:56 UTC (rev 14150)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java 2017-04-21 14:20:56 UTC (rev 14151)
@@ -771,11 +771,6 @@
         }
 
         @Override
-        public String getContentAsString(final String encoding) {
-            return "";
-        }
-
-        @Override
         public InputStream getContentAsStream() {
             return null;
         }

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java 2017-04-21 14:01:56 UTC (rev 14150)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java 2017-04-21 14:20:56 UTC (rev 14151)
@@ -917,6 +917,7 @@
      * @param <T> the object type
      * @return the JavaScript object that corresponds to this node
      */
+    @SuppressWarnings("unchecked")
     public <T> T getScriptableObject() {
         if (scriptObject_ == null) {
             final SgmlPage page = getPage();

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java 2017-04-21 14:01:56 UTC (rev 14150)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java 2017-04-21 14:20:56 UTC (rev 14151)
@@ -123,8 +123,10 @@
      * @return the page that is loaded after the click has taken place
      * @exception IOException If an IO error occurs
      * @exception ElementNotFoundException If a particular XML element could not be found in the DOM model
+     * @deprecated as of 2.25, please use {@link #click()}
      */
     @Override
+    @Deprecated
     public <P extends Page> P click(final int x, final int y) throws IOException, ElementNotFoundException {
         wasPositionSpecified_ = true;
         xPosition_ = x;

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java 2017-04-21 14:01:56 UTC (rev 14150)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java 2017-04-21 14:20:56 UTC (rev 14151)
@@ -1055,16 +1055,6 @@
         }
 
         @Override
-        public String getContentAsString(final String encoding) {
-            return "";
-        }
-
-        @Override
-        public String getContentAsString(final String encoding, final String defaultEncoding) {
-            return "";
-        }
-
-        @Override
         public InputStream getContentAsStream() {
             return null;
         }

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest2.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest2.java 2017-04-21 14:01:56 UTC (rev 14150)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest2.java 2017-04-21 14:20:56 UTC (rev 14151)
@@ -25,6 +25,7 @@
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_USE_DEFAULT_CHARSET_FROM_PAGE;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_WITHCREDENTIALS_ALLOW_ORIGIN_ALL;
 import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.XHR_WITHCREDENTIALS_NOT_WRITEABLE_IN_SYNC_EXCEPTION;
+import static java.nio.charset.StandardCharsets.UTF_8;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -83,7 +84,6 @@
 import com.gargoylesoftware.js.nashorn.internal.runtime.ScriptFunction;
 import com.gargoylesoftware.js.nashorn.internal.runtime.ScriptObject;
 import com.gargoylesoftware.js.nashorn.internal.runtime.ScriptRuntime;
-
 /**
  * A JavaScript object for an {@code XMLHttpRequest}.
  *
@@ -386,7 +386,7 @@
             }
 
             final WebRequest request = new WebRequest(fullUrl, getBrowserVersion().getXmlHttpRequestAcceptHeader());
-            request.setCharset("UTF-8");
+            request.setCharset(UTF_8);
             request.setAdditionalHeader("Referer", containingPage_.getUrl().toExternalForm());
 
             if (!isSameOrigin(originUrl, fullUrl)) {
@@ -933,16 +933,6 @@
         }
 
         @Override
-        public String getContentAsString(final String encoding) {
-            return "";
-        }
-
-        @Override
-        public String getContentAsString(final String encoding, final String defaultEncoding) {
-            return "";
-        }
-
-        @Override
         public InputStream getContentAsStream() {
             return null;
         }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...