This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
The following commit(s) were added to refs/heads/master by this push: new 83cd677 Next version is a minor: We added public and protected APIs. 83cd677 is described below commit 83cd6778f01beef2bea410efd3f813cabeff9203 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Feb 6 12:07:17 2021 -0500 Next version is a minor: We added public and protected APIs. --- pom.xml | 4 ++-- src/changes/changes.xml | 22 ++++++++++++++-------- .../java/org/apache/commons/net/SocketClient.java | 9 +++++++-- .../org/apache/commons/net/util/NetConstants.java | 2 +- src/site/xdoc/index.xml | 4 ++-- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 5719e76..78b1435 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> - <version>3.7.3-SNAPSHOT</version> + <version>3.8.0-SNAPSHOT</version> <name>Apache Commons Net</name> <!-- N.B. the description content is deliberately not indented ! to improve the layout of the Release Notes generated by mvn changes:announcement-generate --> @@ -54,7 +54,7 @@ Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Tel <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-net</commons.scmPubUrl> <!-- Current release --> - <commons.release.version>3.7.3</commons.release.version> + <commons.release.version>3.8.0</commons.release.version> <commons.rc.version>RC1</commons.rc.version> <commons.release.desc>(Requires Java ${maven.compiler.target} or later)</commons.release.desc> diff --git a/src/changes/changes.xml b/src/changes/changes.xml index cbcbfa9..cde7a70 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -63,7 +63,7 @@ The <action> type attribute can be add,update,fix,remove. --> <body> - <release version="3.7.3" date="2020-MM-DD" description="Maintenance and bug fix release."> + <release version="3.8.0" date="2020-MM-DD" description="Maintenance and bug fix release (Java 7)."> <action type="update" dev="ggregory" due-to="Dependabot"> Bump actions/checkout from v2.3.3 to v2.3.4 #69. </action> @@ -76,8 +76,14 @@ The <action> type attribute can be add,update,fix,remove. <action type="update" dev="ggregory" due-to="Arturo Bernal, Gary Gregory"> Minor Improvements #71, #72. </action> + <action type="update" dev="ggregory" due-to="Arturo Bernal, Gary Gregory"> + Add and use NetConstants. + </action> + <action type="update" dev="ggregory" due-to="Gary Gregory"> + Add and use SocketClient.applySocketAttributes(). + </action> </release> - <release version="3.7.2" date="2020-10-14" description="Maintenance and bug fix release."> + <release version="3.7.2" date="2020-10-14" description="Maintenance and bug fix release (Java 7)."> <action issue="NET-689" type="fix" dev="ggregory" due-to="Charlie, Gary Gregory"> Host name is not set on the SSLSocket causing isEndpointCheckingEnabled to fail. </action> @@ -98,7 +104,7 @@ The <action> type attribute can be add,update,fix,remove. Bump junit from 4.13 to 4.13.1 #67. </action> </release> - <release version="3.7.1" date="2020-09-30" description="Maintenance and bug fix release."> + <release version="3.7.1" date="2020-09-30" description="Maintenance and bug fix release (Java 7)."> <action issue="NET-687" type="fix" dev="ggregory" due-to="Gary Gregory, Mikael, j-verse"> [FTPS] javax.net.ssl.SSLException: Unsupported or unrecognized SSL message, #59. </action> @@ -108,7 +114,7 @@ The <action> type attribute can be add,update,fix,remove. </action> </release> <release version="3.7" date="2020-08-05" description=" -This is mainly a bug-fix release. See further details below. +This is mainly a bug-fix release (Java 7). See further details below. This release requires a minimum of Java 7. @@ -211,13 +217,13 @@ This is mainly a bug-fix release. See further details below. </action> </release> <release version="3.6" date="2017-02-15" description=" -This is mainly a bug-fix release. See further details below. +This is mainly a bug-fix release (Java 6). See further details below. This release is binary compatible with previous releases. However it is not source compatible with releases before 3.4, as some methods were added to the interface NtpV3Packet in 3.4 - The code now requires a minimum of Java 1.6. + The code now requires a minimum of Java 6. Changes to functionality: * The FTP client now performs stricter checks on non-multiline command replies. @@ -292,13 +298,13 @@ without checking it if is a space. </action> </release> <release version="3.5" date="2016-05-05" description=" -This is mainly a bug-fix release. See further details below. +This is mainly a bug-fix release (Java 6). See further details below. This release is binary compatible with previous releases. However it is not source compatible with releases before 3.4, as some methods were added to the interface NtpV3Packet in 3.4 - The code now requires a minimum of Java 1.6. + The code now requires a minimum of Java 6. Notable additions: The IMAP examples can now get password from console, stdin or an environment variable. diff --git a/src/main/java/org/apache/commons/net/SocketClient.java b/src/main/java/org/apache/commons/net/SocketClient.java index eee799d..0d5ed10 100644 --- a/src/main/java/org/apache/commons/net/SocketClient.java +++ b/src/main/java/org/apache/commons/net/SocketClient.java @@ -100,6 +100,7 @@ public abstract class SocketClient /** The socket's connect timeout (0 = infinite timeout) */ private static final int DEFAULT_CONNECT_TIMEOUT = 60000; + protected int connectTimeout = DEFAULT_CONNECT_TIMEOUT; /** Hint for SO_RCVBUF size */ @@ -160,12 +161,16 @@ public abstract class SocketClient _output_ = _socket_.getOutputStream(); } - + /** + * Applies socket attributes. + * + * @throws SocketException if there is an error in the underlying protocol, such as a TCP error. + * @since 3.8.0 + */ protected void applySocketAttributes() throws SocketException { _socket_.setSoTimeout(_timeout_); } - /** * Opens a Socket connected to a remote host at the specified port and * originating from the current host at a system assigned port. diff --git a/src/main/java/org/apache/commons/net/util/NetConstants.java b/src/main/java/org/apache/commons/net/util/NetConstants.java index e91c39a..387db99 100644 --- a/src/main/java/org/apache/commons/net/util/NetConstants.java +++ b/src/main/java/org/apache/commons/net/util/NetConstants.java @@ -21,7 +21,7 @@ import java.security.cert.X509Certificate; /** * Constants provided as public only for our own implementation, you can consider this private for now. * - * @since 3.7.3 + * @since 3.8.0 */ public class NetConstants { diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 7683ee0..4e1d197 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -82,12 +82,12 @@ </p> To use one of the sample applications, ensure that the example and main jars are both in the same directory. Then run the class as per the following example: - <pre>java -jar [path/]commons-net-examples-3.7.3.jar FTPClientExample [parameters]</pre> + <pre>java -jar [path/]commons-net-examples-3.8.0.jar FTPClientExample [parameters]</pre> This uses the helper application which supports shorthand class names. <br/> Alternatively, ensure that the example and main jars are on the classpath. Then invoke the class directly, for example: - <pre>java -cp commons-net-examples-3.7.3.jar;commons-net-3.5.jar examples/ftp/FTPClientExample [parameters]</pre> + <pre>java -cp commons-net-examples-3.8.0.jar;commons-net-3.5.jar examples/ftp/FTPClientExample [parameters]</pre> <subsection name="FTP (package: examples/ftp)"> <ul>