[HtmlUnit] SVN: [13768] 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: [13768] trunk/htmlunit

asashour-2
Revision: 13768
          http://sourceforge.net/p/htmlunit/code/13768
Author:   asashour
Date:     2017-03-15 20:51:01 +0000 (Wed, 15 Mar 2017)
Log Message:
-----------
With easier deployment, now fixing JavaDoc (Java 8u121 is needed for new optional parameter).

Modified Paths:
--------------
    trunk/htmlunit/pom.xml
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/TextUtil.java
    trunk/htmlunit/src/site/xdoc/packagingARelease.xml

Modified: trunk/htmlunit/pom.xml
===================================================================
--- trunk/htmlunit/pom.xml 2017-03-15 20:47:13 UTC (rev 13767)
+++ trunk/htmlunit/pom.xml 2017-03-15 20:51:01 UTC (rev 13768)
@@ -122,6 +122,9 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>2.10.4</version>
+                <configuration>
+                    <additionalparam>--allow-script-in-comments</additionalparam>
+                </configuration>
                 <executions>
                     <execution>
                         <goals>

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java 2017-03-15 20:47:13 UTC (rev 13767)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java 2017-03-15 20:51:01 UTC (rev 13768)
@@ -52,36 +52,36 @@
  *      };
  * </pre>
  * <script>
- *     var pre = document.getElementById('htmlUnitCode');
- *     pre.innerHTML = pre.innerHTML.replace('APPNAME', navigator.appName);
- *     pre.innerHTML = pre.innerHTML.replace('APPVERSION', navigator.appVersion);
- *     pre.innerHTML = pre.innerHTML.replace('USERAGENT', navigator.userAgent);
- *     var isMicrosoft = navigator.appVersion.indexOf('Trident/') > 0;
- *     var isEdge = navigator.appVersion.indexOf('Edge') != -1;
- *     var isChrome = navigator.appVersion.indexOf('Chrome') != -1;
- *     var numeric = 45;
- *     if (isMicrosoft) {
- *         numeric = 11;
- *     }
- *     else if (isEdge) {
- *         numeric = 13;
- *     }
- *     else if (isChrome) {
- *         numeric = 56;
- *     }
- *     pre.innerHTML = pre.innerHTML.replace('NUMERIC', numeric);
- *     var browser = "FIREFOX_45";
- *     if (isMicrosoft) {
- *         browser = "INTERNET_EXPLORER";
- *     }
- *     else if (isEdge) {
- *         browser = "EDGE";
- *     }
- *     else if (isChrome) {
- *         browser = "CHROME";
- *     }
- *     pre.innerHTML = pre.innerHTML.replace('BROWSER', browser);
- * </script>
+       var pre = document.getElementById('htmlUnitCode');
+       pre.innerHTML = pre.innerHTML.replace('APPNAME', navigator.appName);
+       pre.innerHTML = pre.innerHTML.replace('APPVERSION', navigator.appVersion);
+       pre.innerHTML = pre.innerHTML.replace('USERAGENT', navigator.userAgent);
+       var isMicrosoft = navigator.appVersion.indexOf('Trident/') != -1;
+       var isEdge = navigator.appVersion.indexOf('Edge') != -1;
+       var isChrome = navigator.appVersion.indexOf('Chrome') != -1;
+       var numeric = 45;
+       if (isMicrosoft) {
+           numeric = 11;
+       }
+       else if (isEdge) {
+           numeric = 13;
+       }
+       else if (isChrome) {
+           numeric = 56;
+       }
+       pre.innerHTML = pre.innerHTML.replace('NUMERIC', numeric);
+       var browser = "FIREFOX_45";
+       if (isMicrosoft) {
+           browser = "INTERNET_EXPLORER";
+       }
+       else if (isEdge) {
+           browser = "EDGE";
+       }
+       else if (isChrome) {
+           browser = "CHROME";
+       }
+       pre.innerHTML = pre.innerHTML.replace('BROWSER', browser);
+   </script>
  * However, note that the constants are not enough to fully customize the browser,
  *   you also need to look into the {@link BrowserVersionFeatures} and the classes inside "javascript" package.
  *

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java 2017-03-15 20:47:13 UTC (rev 13767)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java 2017-03-15 20:51:01 UTC (rev 13768)
@@ -327,7 +327,7 @@
 
     /**
      * Convenient method that is the same as calling
-     * {@link #setResponse(URL,String,int,String,String,String,List)} with a status
+     * {@link #setResponse(URL, String, int, String, String, Charset, List)} with a status
      * of "200 OK" and no additional headers.
      *
      * @param url the URL that will return the given response

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/TextUtil.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/TextUtil.java 2017-03-15 20:47:13 UTC (rev 13767)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/TextUtil.java 2017-03-15 20:51:01 UTC (rev 13768)
@@ -19,7 +19,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 
@@ -54,7 +53,6 @@
      * @param content the string
      * @param charset the encoding to use when converting the string to a stream
      * @return the resulting input stream
-     * @throws UnsupportedEncodingException if the encoding is not supported
      */
     public static InputStream toInputStream(
             final String content,

Modified: trunk/htmlunit/src/site/xdoc/packagingARelease.xml
===================================================================
--- trunk/htmlunit/src/site/xdoc/packagingARelease.xml 2017-03-15 20:47:13 UTC (rev 13767)
+++ trunk/htmlunit/src/site/xdoc/packagingARelease.xml 2017-03-15 20:51:01 UTC (rev 13768)
@@ -85,7 +85,7 @@
                     </li>
                     <li>
                         Build the zip files
-                        <source>mvn -up clean site package -Dmaven.javadoc.failOnError=false</source>
+                        <source>mvn -up clean site package</source>
                     </li>
                     <li>
                         Upload the two zip files (htmlunit-x.y-bin.zip and htmlunit-x.y-src.zip) to


------------------------------------------------------------------------------
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...