You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/06/24 15:02:13 UTC

[commons-net] 02/09: Don't reinitialize to default values

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

commit fd4fc19dc8d391c17ec4bc38fb23e8e3a1b6514e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jun 24 10:43:47 2023 -0400

    Don't reinitialize to default values
---
 src/main/java/org/apache/commons/net/DatagramSocketClient.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/net/DatagramSocketClient.java b/src/main/java/org/apache/commons/net/DatagramSocketClient.java
index ff78bea4..f3bf647d 100644
--- a/src/main/java/org/apache/commons/net/DatagramSocketClient.java
+++ b/src/main/java/org/apache/commons/net/DatagramSocketClient.java
@@ -60,16 +60,12 @@ public abstract class DatagramSocketClient {
     protected boolean _isOpen_;
 
     /** The datagram socket's DatagramSocketFactory. */
-    protected DatagramSocketFactory _socketFactory_;
+    protected DatagramSocketFactory _socketFactory_ = DEFAULT_SOCKET_FACTORY;
 
     /**
      * Default constructor for DatagramSocketClient. Initializes _socket_ to null, _timeout_ to 0, and _isOpen_ to false.
      */
     public DatagramSocketClient() {
-        _socket_ = null;
-        _timeout_ = 0;
-        _isOpen_ = false;
-        _socketFactory_ = DEFAULT_SOCKET_FACTORY;
     }
 
     /**