[prev in list] [next in list] [prev in thread] [next in thread]
List: htmlunit-develop
Subject: [HtmlUnit] SF.net SVN: htmlunit:[6720] trunk/htmlunit/src
From: rbri () users ! sourceforge ! net
Date: 2012-01-19 13:04:23
Message-ID: E1RnrfD-0001ut-Rs () sfp-svn-3 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 6720
http://htmlunit.svn.sourceforge.net/htmlunit/?rev=6720&view=rev
Author: rbri
Date: 2012-01-19 13:04:23 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
Some not needed exception declarations are gone.
Issue 3475974
Modified Paths:
--------------
trunk/htmlunit/src/changes/changes.xml
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BinaryPage.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java
Modified: trunk/htmlunit/src/changes/changes.xml
===================================================================
--- trunk/htmlunit/src/changes/changes.xml 2012-01-19 12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/changes/changes.xml 2012-01-19 13:04:23 UTC (rev 6720)
@@ -6,6 +6,9 @@
<body>
<release version="2.10" date="???" description="Bugfixes">
+ <action type="fix" dev="rbri" issue="3475974">
+ Some not needed exception declarations are gone.
+ </action>
<action type="fix" dev="rbri" issue="3471836" due-to="Hartmut Arlt">
isDisplayed() has to return false for hidden form fields.
</action>
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BinaryPage.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BinaryPage.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BinaryPage.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -14,7 +14,6 @@
*/
package com.gargoylesoftware.htmlunit;
-import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -56,9 +55,8 @@
* Returns an input stream representing all the content that was returned from \
the server.
*
* @return an input stream representing all the content that was returned from \
the server
- * @exception IOException if an IO error occurs
*/
- public InputStream getInputStream() throws IOException {
+ public InputStream getInputStream() {
return webResponse_.getContentAsStream();
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -206,10 +206,8 @@
* Returns a new HttpClient host configuration, initialized based on the \
specified request.
* @param webRequest the request to use to initialize the returned host \
configuration
* @return a new HttpClient host configuration, initialized based on the \
specified request
- * @throws IOException if the specified request contains an invalid URL
*/
- private static HttpHost getHostConfiguration(final WebRequest webRequest)
- throws IOException {
+ private static HttpHost getHostConfiguration(final WebRequest webRequest) {
final URL url = webRequest.getUrl();
final HttpHost hostConfiguration = new HttpHost(url.getHost(), \
url.getPort(), url.getProtocol());
@@ -583,7 +581,7 @@
* Converts an HttpMethod into a WebResponse.
*/
private WebResponse makeWebResponse(final HttpResponse httpResponse,
- final WebRequest request, final DownloadedContent responseBody, final \
long loadTime) throws IOException { + final WebRequest request, final \
DownloadedContent responseBody, final long loadTime) {
String statusMessage = httpResponse.getStatusLine().getReasonPhrase();
if (statusMessage == null) {
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -179,12 +179,7 @@
private WebResponseData buildWebResponseData(final byte[] content, final int \
statusCode, final String statusMessage, final List<NameValuePair> compiledHeaders) {
- try {
- return new WebResponseData(content, statusCode, statusMessage, \
compiledHeaders);
- }
- catch (final IOException e) {
- throw new RuntimeException(e);
- }
+ return new WebResponseData(content, statusCode, statusMessage, \
compiledHeaders); }
/**
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -14,7 +14,6 @@
*/
package com.gargoylesoftware.htmlunit;
-import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -48,12 +47,7 @@
final byte[] content = TextUtil.stringToByteArray(contentString, charset);
final List<NameValuePair> compiledHeaders = new ArrayList<NameValuePair>();
compiledHeaders.add(new NameValuePair("Content-Type", "text/html"));
- try {
- return new WebResponseData(content, HttpStatus.SC_OK, "OK", \
compiledHeaders);
- }
- catch (final IOException e) {
- throw new RuntimeException(e);
- }
+ return new WebResponseData(content, HttpStatus.SC_OK, "OK", \
compiledHeaders); }
/**
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -14,7 +14,6 @@
*/
package com.gargoylesoftware.htmlunit;
-import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -58,10 +57,8 @@
* Returns an input stream representing all the content that was returned from \
the server.
*
* @return an input stream representing all the content that was returned from \
the server
- * @exception IOException if an IO error occurs
*/
- public InputStream getInputStream()
- throws IOException {
+ public InputStream getInputStream() {
return webResponse_.getContentAsStream();
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -50,10 +50,9 @@
* @param statusCode Status code from the server
* @param statusMessage Status message from the server
* @param responseHeaders Headers in this response
- * @throws IOException on stream errors
*/
public WebResponseData(final byte[] body, final int statusCode, final String \
statusMessage,
- final List<NameValuePair> responseHeaders) throws IOException {
+ final List<NameValuePair> responseHeaders) {
this(new DownloadedContent.InMemory(body), statusCode, statusMessage, \
responseHeaders); }
@@ -63,15 +62,10 @@
* @param statusCode Status code from the server
* @param statusMessage Status message from the server
* @param responseHeaders Headers in this response
- *
- * @throws IOException on stream errors
*/
protected WebResponseData(final int statusCode,
- final String statusMessage, final List<NameValuePair> responseHeaders) \
throws IOException {
- statusCode_ = statusCode;
- statusMessage_ = statusMessage;
- responseHeaders_ = Collections.unmodifiableList(responseHeaders);
- downloadedContent_ = new \
DownloadedContent.InMemory(ArrayUtils.EMPTY_BYTE_ARRAY); + final String \
statusMessage, final List<NameValuePair> responseHeaders) { + \
this(ArrayUtils.EMPTY_BYTE_ARRAY, statusCode, statusMessage, responseHeaders); }
/**
@@ -80,10 +74,9 @@
* @param statusCode Status code from the server
* @param statusMessage Status message from the server
* @param responseHeaders Headers in this response
- * @throws IOException on stream errors
*/
public WebResponseData(final DownloadedContent responseBody, final int \
statusCode, final String statusMessage,
- final List<NameValuePair> responseHeaders) throws IOException {
+ final List<NameValuePair> responseHeaders) {
statusCode_ = statusCode;
statusMessage_ = statusMessage;
responseHeaders_ = Collections.unmodifiableList(responseHeaders);
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -14,7 +14,6 @@
*/
package com.gargoylesoftware.htmlunit.html;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -100,9 +99,8 @@
*
* @param submitElement the element that caused the submit to occur
* @return a new page that reflects the results of this submission
- * @exception IOException if an IO error occurs
*/
- Page submit(final SubmittableElement submitElement) throws IOException {
+ Page submit(final SubmittableElement submitElement) {
final HtmlPage htmlPage = (HtmlPage) getPage();
final WebClient webClient = htmlPage.getWebClient();
if (webClient.isJavaScriptEnabled()) {
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -136,9 +136,8 @@
/**
* Returns the value of the rel property.
* @return the rel property
- * @throws Exception if an error occurs
*/
- public String jsxGet_rel() throws Exception {
+ public String jsxGet_rel() {
return ((HtmlAnchor) getDomNodeOrDie()).getRelAttribute();
}
@@ -153,9 +152,8 @@
/**
* Returns the value of the rev property.
* @return the rev property
- * @throws Exception if an error occurs
*/
- public String jsxGet_rev() throws Exception {
+ public String jsxGet_rev() {
return ((HtmlAnchor) getDomNodeOrDie()).getRevAttribute();
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -14,7 +14,6 @@
*/
package com.gargoylesoftware.htmlunit.javascript.host.html;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Iterator;
@@ -267,12 +266,8 @@
/**
* Submits the form (at the end of the current script execution).
- *
- * @throws IOException if an IO error occurs
*/
- public void jsxFunction_submit()
- throws IOException {
-
+ public void jsxFunction_submit() {
final HtmlPage page = (HtmlPage) getDomNodeOrDie().getPage();
final WebClient webClient = page.getWebClient();
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java 2012-01-19 \
12:04:58 UTC (rev 6719)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java 2012-01-19 \
13:04:23 UTC (rev 6720) @@ -52,9 +52,8 @@
/**
* Returns the value of the href property.
* @return the href property
- * @throws Exception if an error occurs
*/
- public String jsxGet_href() throws Exception {
+ public String jsxGet_href() {
final HtmlLink link = (HtmlLink) getDomNodeOrDie();
final String href = link.getHrefAttribute();
if (href.length() == 0) {
@@ -79,9 +78,8 @@
/**
* Returns the value of the rel property.
* @return the rel property
- * @throws Exception if an error occurs
*/
- public String jsxGet_rel() throws Exception {
+ public String jsxGet_rel() {
return ((HtmlLink) getDomNodeOrDie()).getRelAttribute();
}
@@ -96,9 +94,8 @@
/**
* Returns the value of the rev property.
* @return the rev property
- * @throws Exception if an error occurs
*/
- public String jsxGet_rev() throws Exception {
+ public String jsxGet_rev() {
return ((HtmlLink) getDomNodeOrDie()).getRevAttribute();
}
@@ -113,9 +110,8 @@
/**
* Returns the value of the type property.
* @return the type property
- * @throws Exception if an error occurs
*/
- public String jsxGet_type() throws Exception {
+ public String jsxGet_type() {
return ((HtmlLink) getDomNodeOrDie()).getTypeAttribute();
}
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic