You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/04/25 23:12:31 UTC
svn commit: r1792682 -
/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java
Author: ggregory
Date: Tue Apr 25 23:12:31 2017
New Revision: 1792682
URL: http://svn.apache.org/viewvc?rev=1792682&view=rev
Log:
HTTPCORE-458: Validate port values. Javadoc.
Modified:
httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java
Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java?rev=1792682&r1=1792681&r2=1792682&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/HttpHost.java Tue Apr 25 23:12:31 2017
@@ -179,6 +179,9 @@ public final class HttpHost implements N
* {@code null} indicates the
* {@link #DEFAULT_SCHEME_NAME default scheme}
*
+ * @throws IllegalArgumentException
+ * If the port parameter is outside the specified range of valid port values, which is between 0 and
+ * 65535, inclusive. {@code -1} indicates the scheme default port.
* @since 4.3
*/
public HttpHost(final InetAddress address, final int port, final String scheme) {
@@ -196,6 +199,9 @@ public final class HttpHost implements N
* {@code null} indicates the
* {@link #DEFAULT_SCHEME_NAME default scheme}
*
+ * @throws IllegalArgumentException
+ * If the port parameter is outside the specified range of valid port values, which is between 0 and
+ * 65535, inclusive. {@code -1} indicates the scheme default port.
* @since 4.4
*/
public HttpHost(final InetAddress address, final String hostname, final int port, final String scheme) {
@@ -219,6 +225,9 @@ public final class HttpHost implements N
* @param port the port number.
* {@code -1} indicates the scheme default port.
*
+ * @throws IllegalArgumentException
+ * If the port parameter is outside the specified range of valid port values, which is between 0 and
+ * 65535, inclusive. {@code -1} indicates the scheme default port.
* @since 4.3
*/
public HttpHost(final InetAddress address, final int port) {
@@ -231,6 +240,9 @@ public final class HttpHost implements N
*
* @param address the inet address.
*
+ * @throws IllegalArgumentException
+ * If the port parameter is outside the specified range of valid port values, which is between 0 and
+ * 65535, inclusive. {@code -1} indicates the scheme default port.
* @since 4.3
*/
public HttpHost(final InetAddress address) {