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 ef02af5a Add DatagramSocketClient.getDefaultTimeoutDuration()
ef02af5a is described below
commit ef02af5aff6c49a2f4d09c8c01f9fe900d85a6a9
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Dec 4 06:58:06 2025 -0500
Add DatagramSocketClient.getDefaultTimeoutDuration()
---
src/changes/changes.xml | 3 ++-
src/main/java/org/apache/commons/net/DatagramSocketClient.java | 10 ++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7fed7654..67382414 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -61,12 +61,13 @@ The <action> type attribute can be add,update,fix,remove.
Defining changes.version allows one to create the RN without first
removing the SNAPSHOT suffix.
-->
<body>
- <release version="3.12.1" date="YYYY-MM-DD" description="This is a feature
and maintenance release. Java 8 or later is required.">
+ <release version="3.13.0" date="YYYY-MM-DD" description="This is a feature
and maintenance release. Java 8 or later is required.">
<!-- FIX -->
<action type="fix" dev="ggregory" due-to="Henri Biestro, Gary
Gregory">org.apache.commons.net.daytime.DaytimeTCPClientTest now should now
pass inside most VPNs.</action>
<action type="fix" dev="ggregory" due-to="Jakub Kupczyk">Migrate tests
to JUnit5 #358.</action>
<action type="fix" dev="ggregory" due-to="Jakub Kupczyk, Gary
Gregory">Migrate tests to JUnit5 - final #359.</action>
<!-- ADD -->
+ <action type="add" dev="ggregory" due-to="Gary Gregory">Add
DatagramSocketClient.getDefaultTimeoutDuration().</action>
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Gary Gregory,
Dependabot">Bump org.apache.commons:commons-parent from 85 to 93 #371, #388,
#389.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory,
Dependabot">Bump org.apache.commons:commons-lang3 from 3.18.0 to
3.19.0.</action>
diff --git a/src/main/java/org/apache/commons/net/DatagramSocketClient.java
b/src/main/java/org/apache/commons/net/DatagramSocketClient.java
index 8effc8cf..c8a1d410 100644
--- a/src/main/java/org/apache/commons/net/DatagramSocketClient.java
+++ b/src/main/java/org/apache/commons/net/DatagramSocketClient.java
@@ -125,6 +125,16 @@ public abstract class DatagramSocketClient implements
AutoCloseable {
return _timeout_;
}
+ /**
+ * Gets the default timeout duration that is used when opening a socket.
+ *
+ * @return The default timeout duration that is used when opening a socket.
+ * @since 3.13.0
+ */
+ public Duration getDefaultTimeoutDuration() {
+ return Duration.ofMillis(_timeout_);
+ }
+
/**
* Gets the local address to which the client's socket is bound. If you
call this method when the client socket is not open, a NullPointerException is
* thrown.