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 2025/03/05 13:46:52 UTC
(commons-net) branch master updated (d024e94a -> 33a1949f)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git
from d024e94a Add accessing options map for TFTP request packet and allow using 'blksize' option #331
new 7d6ed72e Internal refactoring for a magic number
new 33a1949f Fix odd Javadoc formatting of inline @link tags
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/commons/net/DatagramSocketClient.java | 8 ++++----
.../apache/commons/net/ProtocolCommandSupport.java | 4 ++--
.../java/org/apache/commons/net/SocketClient.java | 16 +++++++--------
.../org/apache/commons/net/bsd/RCommandClient.java | 22 ++++++++++----------
.../org/apache/commons/net/bsd/RLoginClient.java | 10 ++++-----
.../commons/net/chargen/CharGenTCPClient.java | 2 +-
.../commons/net/chargen/CharGenUDPClient.java | 2 +-
.../commons/net/daytime/DaytimeTCPClient.java | 2 +-
.../commons/net/discard/DiscardTCPClient.java | 2 +-
.../commons/net/discard/DiscardUDPClient.java | 2 +-
.../org/apache/commons/net/echo/EchoTCPClient.java | 4 ++--
.../org/apache/commons/net/echo/EchoUDPClient.java | 2 +-
src/main/java/org/apache/commons/net/ftp/FTP.java | 2 +-
.../java/org/apache/commons/net/ftp/FTPClient.java | 6 +++---
.../parser/DefaultFTPFileEntryParserFactory.java | 4 ++--
.../commons/net/io/FromNetASCIIOutputStream.java | 2 +-
.../java/org/apache/commons/net/nntp/NNTP.java | 2 +-
.../org/apache/commons/net/nntp/NNTPClient.java | 8 ++++----
.../java/org/apache/commons/net/pop3/POP3.java | 4 ++--
.../org/apache/commons/net/pop3/POP3Client.java | 2 +-
.../java/org/apache/commons/net/smtp/SMTP.java | 2 +-
.../org/apache/commons/net/smtp/SMTPClient.java | 8 ++++----
.../apache/commons/net/telnet/TelnetClient.java | 4 ++--
.../java/org/apache/commons/net/tftp/TFTP.java | 24 +++++++++++++---------
.../org/apache/commons/net/tftp/TFTPClient.java | 6 +++---
.../org/apache/commons/net/time/TimeTCPClient.java | 2 +-
.../apache/commons/net/util/KeyManagerUtils.java | 2 +-
.../parser/OS400FTPEntryParserAdditionalTest.java | 2 +-
.../net/ftp/parser/OS400FTPEntryParserTest.java | 2 +-
29 files changed, 81 insertions(+), 77 deletions(-)
(commons-net) 02/02: Fix odd Javadoc formatting of inline @link tags
Posted by gg...@apache.org.
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 33a1949f1ca5065beb0f0e9ab99d3e9fa8d61689
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Mar 5 08:46:46 2025 -0500
Fix odd Javadoc formatting of inline @link tags
---
.../apache/commons/net/DatagramSocketClient.java | 8 ++++----
.../apache/commons/net/ProtocolCommandSupport.java | 4 ++--
.../java/org/apache/commons/net/SocketClient.java | 16 ++++++++--------
.../org/apache/commons/net/bsd/RCommandClient.java | 22 +++++++++++-----------
.../org/apache/commons/net/bsd/RLoginClient.java | 10 +++++-----
.../commons/net/chargen/CharGenTCPClient.java | 2 +-
.../commons/net/chargen/CharGenUDPClient.java | 2 +-
.../commons/net/daytime/DaytimeTCPClient.java | 2 +-
.../commons/net/discard/DiscardTCPClient.java | 2 +-
.../commons/net/discard/DiscardUDPClient.java | 2 +-
.../org/apache/commons/net/echo/EchoTCPClient.java | 4 ++--
.../org/apache/commons/net/echo/EchoUDPClient.java | 2 +-
src/main/java/org/apache/commons/net/ftp/FTP.java | 2 +-
.../java/org/apache/commons/net/ftp/FTPClient.java | 6 +++---
.../parser/DefaultFTPFileEntryParserFactory.java | 4 ++--
.../commons/net/io/FromNetASCIIOutputStream.java | 2 +-
.../java/org/apache/commons/net/nntp/NNTP.java | 2 +-
.../org/apache/commons/net/nntp/NNTPClient.java | 8 ++++----
.../java/org/apache/commons/net/pop3/POP3.java | 4 ++--
.../org/apache/commons/net/pop3/POP3Client.java | 2 +-
.../java/org/apache/commons/net/smtp/SMTP.java | 2 +-
.../org/apache/commons/net/smtp/SMTPClient.java | 8 ++++----
.../apache/commons/net/telnet/TelnetClient.java | 4 ++--
.../org/apache/commons/net/tftp/TFTPClient.java | 6 +++---
.../org/apache/commons/net/time/TimeTCPClient.java | 2 +-
.../apache/commons/net/util/KeyManagerUtils.java | 2 +-
.../parser/OS400FTPEntryParserAdditionalTest.java | 2 +-
.../net/ftp/parser/OS400FTPEntryParserTest.java | 2 +-
28 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/src/main/java/org/apache/commons/net/DatagramSocketClient.java b/src/main/java/org/apache/commons/net/DatagramSocketClient.java
index f93b37f6..449e799d 100644
--- a/src/main/java/org/apache/commons/net/DatagramSocketClient.java
+++ b/src/main/java/org/apache/commons/net/DatagramSocketClient.java
@@ -85,7 +85,7 @@ public abstract class DatagramSocketClient implements AutoCloseable {
/**
* Closes the DatagramSocket used for the connection. You should call this method after you've finished using the class instance and also before you call
- * {@link #open open() } again. _isOpen_ is set to false and _socket_ is set to null.
+ * {@link #open open()} again. _isOpen_ is set to false and _socket_ is set to null.
*/
@Override
public void close() {
@@ -180,7 +180,7 @@ public abstract class DatagramSocketClient implements AutoCloseable {
/**
* Opens a DatagramSocket on the local host at the first available port. Also sets the timeout on the socket to the default timeout set by
- * {@link #setDefaultTimeout setDefaultTimeout() }.
+ * {@link #setDefaultTimeout setDefaultTimeout()}.
* <p>
* _isOpen_ is set to true after calling this method and _socket_ is set to the newly opened socket.
* </p>
@@ -195,7 +195,7 @@ public abstract class DatagramSocketClient implements AutoCloseable {
/**
* Opens a DatagramSocket on the local host at a specified port. Also sets the timeout on the socket to the default timeout set by {@link #setDefaultTimeout
- * setDefaultTimeout() }.
+ * setDefaultTimeout()}.
* <p>
* _isOpen_ is set to true after calling this method and _socket_ is set to the newly opened socket.
* </p>
@@ -211,7 +211,7 @@ public abstract class DatagramSocketClient implements AutoCloseable {
/**
* Opens a DatagramSocket at the specified address on the local host at a specified port. Also sets the timeout on the socket to the default timeout set by
- * {@link #setDefaultTimeout setDefaultTimeout() }.
+ * {@link #setDefaultTimeout setDefaultTimeout()}.
* <p>
* _isOpen_ is set to true after calling this method and _socket_ is set to the newly opened socket.
* </p>
diff --git a/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java b/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java
index fdb05d8c..e7d99f0a 100644
--- a/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java
+++ b/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java
@@ -65,7 +65,7 @@ public class ProtocolCommandSupport implements Serializable {
/**
* Fires a ProtocolCommandEvent signalling the sending of a command to all registered listeners, invoking their
- * {@link org.apache.commons.net.ProtocolCommandListener#protocolCommandSent protocolCommandSent() } methods.
+ * {@link org.apache.commons.net.ProtocolCommandListener#protocolCommandSent protocolCommandSent()} methods.
*
* @param command The string representation of the command type sent, not including the arguments (e.g., "STAT" or "GET").
* @param message The entire command string verbatim as sent to the server, including all arguments.
@@ -80,7 +80,7 @@ public class ProtocolCommandSupport implements Serializable {
/**
* Fires a ProtocolCommandEvent signalling the reception of a command reply to all registered listeners, invoking their
- * {@link org.apache.commons.net.ProtocolCommandListener#protocolReplyReceived protocolReplyReceived() } methods.
+ * {@link org.apache.commons.net.ProtocolCommandListener#protocolReplyReceived protocolReplyReceived()} methods.
*
* @param replyCode The integer code indicating the natureof the reply. This will be the protocol integer value for protocols that use integer reply codes,
* or the reply class constant corresponding to the reply for protocols like POP3 that use strings like OK rather than integer codes (i.e.,
diff --git a/src/main/java/org/apache/commons/net/SocketClient.java b/src/main/java/org/apache/commons/net/SocketClient.java
index 6be8332f..ba872ff8 100644
--- a/src/main/java/org/apache/commons/net/SocketClient.java
+++ b/src/main/java/org/apache/commons/net/SocketClient.java
@@ -170,7 +170,7 @@ public abstract class SocketClient {
* a connection, rather than reimplementing all the connect() methods. The last action performed by every connect() method after opening a socket is to
* call this method.
* <p>
- * This method sets the timeout on the just opened socket to the default timeout set by {@link #setDefaultTimeout setDefaultTimeout() }, sets _input_ and
+ * This method sets the timeout on the just opened socket to the default timeout set by {@link #setDefaultTimeout setDefaultTimeout()}, sets _input_ and
* _output_ to the socket's InputStream and OutputStream respectively, and sets _isConnected_ to true.
* <p>
* Subclasses overriding this method should start by calling {@code super._connectAction_()} first to ensure the initialization of the aforementioned
@@ -220,7 +220,7 @@ public abstract class SocketClient {
/**
* Opens a Socket connected to a remote host at the current default port and originating from the current host at a system assigned port. Before returning,
- * {@link #_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link #_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param host The remote host.
* @throws SocketException If the socket timeout could not be set.
@@ -234,7 +234,7 @@ public abstract class SocketClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the current host at a system assigned port. Before returning,
- * {@link #_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link #_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param host The remote host.
* @param port The port to connect to on the remote host.
@@ -249,7 +249,7 @@ public abstract class SocketClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the specified local address and port. Before returning,
- * {@link #_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link #_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param host The remote host.
* @param port The port to connect to on the remote host.
@@ -266,7 +266,7 @@ public abstract class SocketClient {
/**
* Opens a Socket connected to a remote host at the current default port and originating from the current host at a system assigned port. Before returning,
- * {@link #_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link #_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param hostname The name of the remote host.
* @throws SocketException If the socket timeout could not be set.
@@ -280,7 +280,7 @@ public abstract class SocketClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the current host at a system assigned port. Before returning,
- * {@link #_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link #_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param hostname The name of the remote host.
* @param port The port to connect to on the remote host.
@@ -295,7 +295,7 @@ public abstract class SocketClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the specified local address and port. Before returning,
- * {@link #_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link #_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param hostname The name of the remote host.
* @param port The port to connect to on the remote host.
@@ -320,7 +320,7 @@ public abstract class SocketClient {
/**
* Disconnects the socket connection. You should call this method after you've finished using the class instance and also before you call {@link #connect
- * connect() } again. _isConnected_ is set to false, _socket_ is set to null, _input_ is set to null, and _output_ is set to null.
+ * connect()} again. _isConnected_ is set to false, _socket_ is set to null, _input_ is set to null, and _output_ is set to null.
*
* @throws IOException not thrown, subclasses may throw.
*/
diff --git a/src/main/java/org/apache/commons/net/bsd/RCommandClient.java b/src/main/java/org/apache/commons/net/bsd/RCommandClient.java
index 52022315..cacbbef7 100644
--- a/src/main/java/org/apache/commons/net/bsd/RCommandClient.java
+++ b/src/main/java/org/apache/commons/net/bsd/RCommandClient.java
@@ -43,16 +43,16 @@ import org.apache.commons.net.io.SocketInputStream;
* <p>
* As with virtually all the client classes in org.apache.commons.net, this class derives from SocketClient. But it overrides most of its connection methods
* so that the local Socket will originate from an acceptable rshell port. The way to use RCommandClient is to first connect to the server, call the
- * {@link #rcommand rcommand() } method, and then fetch the connection's input, output, and optionally error streams. Interaction with the remote command is
+ * {@link #rcommand rcommand()} method, and then fetch the connection's input, output, and optionally error streams. Interaction with the remote command is
* controlled entirely through the I/O streams. Once you have finished processing the streams, you should invoke
- * {@link org.apache.commons.net.bsd.RExecClient#disconnect disconnect() } to clean up properly.
+ * {@link org.apache.commons.net.bsd.RExecClient#disconnect disconnect()} to clean up properly.
* </p>
* <p>
* By default, the standard output and standard error streams of the remote process are transmitted over the same connection, readable from the input stream
- * returned by {@link org.apache.commons.net.bsd.RExecClient#getInputStream getInputStream() } . However, it is possible to tell the rshd daemon to return the
+ * returned by {@link org.apache.commons.net.bsd.RExecClient#getInputStream getInputStream()} . However, it is possible to tell the rshd daemon to return the
* standard error stream over a separate connection, readable from the input stream returned by {@link org.apache.commons.net.bsd.RExecClient#getErrorStream
- * getErrorStream() } . You can specify that a separate connection should be created for standard error by setting the boolean
- * {@code separateErrorStream} parameter of {@link #rcommand rcommand() } to {@code true}. The standard input of the remote process can be written
+ * getErrorStream()} . You can specify that a separate connection should be created for standard error by setting the boolean
+ * {@code separateErrorStream} parameter of {@link #rcommand rcommand()} to {@code true}. The standard input of the remote process can be written
* to through the output stream returned by {@link org.apache.commons.net.bsd.RExecClient#getOutputStream getOutputStream()}.
* </p>
*
@@ -86,7 +86,7 @@ public class RCommandClient extends RExecClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the current host at a port in a range acceptable to the BSD rshell
- * daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_() } is called to perform connection initialization
+ * daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_()} is called to perform connection initialization
* actions.
*
* @param host The remote host.
@@ -103,7 +103,7 @@ public class RCommandClient extends RExecClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the specified local address using a port in a range acceptable to
- * the BSD rshell daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_() } is called to perform connection
+ * the BSD rshell daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_()} is called to perform connection
* initialization actions.
*
* @param host The remote host.
@@ -136,7 +136,7 @@ public class RCommandClient extends RExecClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the specified local address and port. The local port must lie
* between {@code MIN_CLIENT_PORT} and {@code MAX_CLIENT_PORT} or an IllegalArgumentException will be thrown. Before returning,
- * {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param host The remote host.
* @param port The port to connect to on the remote host.
@@ -158,7 +158,7 @@ public class RCommandClient extends RExecClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the current host at a port in a range acceptable to the BSD rshell
- * daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_() } is called to perform connection initialization
+ * daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_()} is called to perform connection initialization
* actions.
*
* @param hostname The name of the remote host.
@@ -176,7 +176,7 @@ public class RCommandClient extends RExecClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the specified local address using a port in a range acceptable to
- * the BSD rshell daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_() } is called to perform connection
+ * the BSD rshell daemon. Before returning, {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_()} is called to perform connection
* initialization actions.
*
* @param hostname The remote host.
@@ -194,7 +194,7 @@ public class RCommandClient extends RExecClient {
/**
* Opens a Socket connected to a remote host at the specified port and originating from the specified local address and port. The local port must lie
* between {@code MIN_CLIENT_PORT} and {@code MAX_CLIENT_PORT} or an IllegalArgumentException will be thrown. Before returning,
- * {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_() } is called to perform connection initialization actions.
+ * {@link org.apache.commons.net.SocketClient#_connectAction_ _connectAction_()} is called to perform connection initialization actions.
*
* @param hostname The name of the remote host.
* @param port The port to connect to on the remote host.
diff --git a/src/main/java/org/apache/commons/net/bsd/RLoginClient.java b/src/main/java/org/apache/commons/net/bsd/RLoginClient.java
index 8da305f6..dae095e1 100644
--- a/src/main/java/org/apache/commons/net/bsd/RLoginClient.java
+++ b/src/main/java/org/apache/commons/net/bsd/RLoginClient.java
@@ -27,18 +27,18 @@ import java.io.IOException;
* <p>
* As with virtually all the client classes in org.apache.commons.net, this class derives from SocketClient. But it relies on the connection methods defined
* in RcommandClient which ensure that the local Socket will originate from an acceptable rshell port. The way to use RLoginClient is to first connect to the
- * server, call the {@link #rlogin rlogin() } method, and then fetch the connection's input and output streams. Interaction with the remote command is
+ * server, call the {@link #rlogin rlogin()} method, and then fetch the connection's input and output streams. Interaction with the remote command is
* controlled entirely through the I/O streams. Once you have finished processing the streams, you should invoke
- * {@link org.apache.commons.net.bsd.RExecClient#disconnect disconnect() } to clean up properly.
+ * {@link org.apache.commons.net.bsd.RExecClient#disconnect disconnect()} to clean up properly.
* </p>
* <p>
* The standard output and standard error streams of the remote process are transmitted over the same connection, readable from the input stream returned by
- * {@link org.apache.commons.net.bsd.RExecClient#getInputStream getInputStream() }
+ * {@link org.apache.commons.net.bsd.RExecClient#getInputStream getInputStream()}
* </p>
* <p>
* Unlike RExecClient and RCommandClient, it is not possible to tell the rlogind daemon to return the standard error stream over a separate connection.
- * {@link org.apache.commons.net.bsd.RExecClient#getErrorStream getErrorStream() } will always return null. The standard input of the remote process can be
- * written to through the output stream returned by {@link org.apache.commons.net.bsd.RExecClient#getOutputStream getOutputSream() }
+ * {@link org.apache.commons.net.bsd.RExecClient#getErrorStream getErrorStream()} will always return null. The standard input of the remote process can be
+ * written to through the output stream returned by {@link org.apache.commons.net.bsd.RExecClient#getOutputStream getOutputSream()}
* </p>
*
* @see org.apache.commons.net.SocketClient
diff --git a/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java b/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java
index ec609304..5d8a12f6 100644
--- a/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java
+++ b/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java
@@ -28,7 +28,7 @@ import org.apache.commons.net.SocketClient;
* close the connection.
* <p>
* To use the CharGenTCPClient class, just establish a connection with {@link org.apache.commons.net.SocketClient#connect connect } and call
- * {@link #getInputStream getInputStream() } to access the data. Don't close the input stream when you're done with it. Rather, call
+ * {@link #getInputStream getInputStream()} to access the data. Don't close the input stream when you're done with it. Rather, call
* {@link org.apache.commons.net.SocketClient#disconnect disconnect } to clean up properly.
* </p>
*
diff --git a/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java b/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java
index da8a54b2..69d8c2fc 100644
--- a/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java
+++ b/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java
@@ -33,7 +33,7 @@ import org.apache.commons.net.util.NetConstants;
* To use the CharGenUDPClient class, just open a local UDP port with {@link org.apache.commons.net.DatagramSocketClient#open open } and call {@link #send send
* } to send the datagram that will initiate the data reply. For chargen or quote of the day, just call {@link #receive receive }, and you're done. For netstat
* and systat, call receive in a while loop, and catch a SocketException and InterruptedIOException to detect a timeout (don't forget to set the timeout
- * duration beforehand). Don't forget to call {@link org.apache.commons.net.DatagramSocketClient#close close() } to clean up properly.
+ * duration beforehand). Don't forget to call {@link org.apache.commons.net.DatagramSocketClient#close close()} to clean up properly.
* </p>
*
* @see CharGenTCPClient
diff --git a/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java b/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java
index 2040c698..b0764450 100644
--- a/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java
+++ b/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java
@@ -24,7 +24,7 @@ import org.apache.commons.net.SocketClient;
/**
* The DaytimeTCPClient class is a TCP implementation of a client for the Daytime protocol described in RFC 867. To use the class, merely establish a connection
- * with {@link org.apache.commons.net.SocketClient#connect connect } and call {@link #getTime getTime() } to retrieve the daytime string, then call
+ * with {@link org.apache.commons.net.SocketClient#connect connect } and call {@link #getTime getTime()} to retrieve the daytime string, then call
* {@link org.apache.commons.net.SocketClient#disconnect disconnect } to close the connection properly.
*
* @see DaytimeUDPClient
diff --git a/src/main/java/org/apache/commons/net/discard/DiscardTCPClient.java b/src/main/java/org/apache/commons/net/discard/DiscardTCPClient.java
index 967ff2c4..6eed81f2 100644
--- a/src/main/java/org/apache/commons/net/discard/DiscardTCPClient.java
+++ b/src/main/java/org/apache/commons/net/discard/DiscardTCPClient.java
@@ -23,7 +23,7 @@ import org.apache.commons.net.SocketClient;
/**
* The DiscardTCPClient class is a TCP implementation of a client for the Discard protocol described in RFC 863. To use the class, merely establish a connection
- * with {@link org.apache.commons.net.SocketClient#connect connect } and call {@link #getOutputStream getOutputStream() } to retrieve the discard output stream.
+ * with {@link org.apache.commons.net.SocketClient#connect connect } and call {@link #getOutputStream getOutputStream()} to retrieve the discard output stream.
* Don't close the output stream when you're done writing to it. Rather, call {@link org.apache.commons.net.SocketClient#disconnect disconnect } to clean up
* properly.
*
diff --git a/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java b/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java
index bf575ada..de06dc22 100644
--- a/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java
+++ b/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java
@@ -27,7 +27,7 @@ import org.apache.commons.net.util.NetConstants;
/**
* The DiscardUDPClient class is a UDP implementation of a client for the Discard protocol described in RFC 863. To use the class, just open a local UDP port
* with {@link org.apache.commons.net.DatagramSocketClient#open open } and call {@link #send send } to send datagrams to the server After you're done sending
- * discard data, call {@link org.apache.commons.net.DatagramSocketClient#close close() } to clean up properly.
+ * discard data, call {@link org.apache.commons.net.DatagramSocketClient#close close()} to clean up properly.
*
* @see DiscardTCPClient
*/
diff --git a/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java b/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java
index a980e470..237f97b8 100644
--- a/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java
+++ b/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java
@@ -23,8 +23,8 @@ import org.apache.commons.net.discard.DiscardTCPClient;
/**
* The EchoTCPClient class is a TCP implementation of a client for the Echo protocol described in RFC 862. To use the class, merely establish a connection with
- * {@link org.apache.commons.net.SocketClient#connect connect } and call {@link DiscardTCPClient#getOutputStream getOutputStream() } to retrieve the echo output
- * stream and {@link #getInputStream getInputStream() } to get the echo input stream. Don't close either stream when you're done using them. Rather, call
+ * {@link org.apache.commons.net.SocketClient#connect connect } and call {@link DiscardTCPClient#getOutputStream getOutputStream()} to retrieve the echo output
+ * stream and {@link #getInputStream getInputStream()} to get the echo input stream. Don't close either stream when you're done using them. Rather, call
* {@link org.apache.commons.net.SocketClient#disconnect disconnect } to clean up properly.
*
* @see EchoUDPClient
diff --git a/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java b/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java
index c3baf0de..1d45611d 100644
--- a/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java
+++ b/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java
@@ -27,7 +27,7 @@ import org.apache.commons.net.util.NetConstants;
/**
* The EchoUDPClient class is a UDP implementation of a client for the Echo protocol described in RFC 862. To use the class, just open a local UDP port with
* {@link org.apache.commons.net.DatagramSocketClient#open open } and call {@link #send send } to send datagrams to the server, then call {@link #receive
- * receive } to receive echoes. After you're done echoing data, call {@link org.apache.commons.net.DatagramSocketClient#close close() } to clean up properly.
+ * receive } to receive echoes. After you're done echoing data, call {@link org.apache.commons.net.DatagramSocketClient#close close()} to clean up properly.
*
* @see EchoTCPClient
* @see DiscardUDPClient
diff --git a/src/main/java/org/apache/commons/net/ftp/FTP.java b/src/main/java/org/apache/commons/net/ftp/FTP.java
index 9172854e..c3e72b7d 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTP.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTP.java
@@ -56,7 +56,7 @@ import org.apache.commons.net.util.NetConstants;
* method encountering that reply will throw an {@link org.apache.commons.net.ftp.FTPConnectionClosedException}. {@code FTPConectionClosedException} is a
* subclass of {@code IOException} and therefore need not be caught separately, but if you are going to catch it separately, its catch block must appear
* before the more general {@code IOException} catch block. When you encounter an {@link org.apache.commons.net.ftp.FTPConnectionClosedException} , you
- * must disconnect the connection with {@link #disconnect disconnect() } to properly clean up the system resources used by FTP. Before disconnecting, you may
+ * must disconnect the connection with {@link #disconnect disconnect()} to properly clean up the system resources used by FTP. Before disconnecting, you may
* check the last reply code and text with {@link #getReplyCode getReplyCode }, {@link #getReplyString getReplyString }, and {@link #getReplyStrings
* getReplyStrings}. You may avoid server disconnections while the client is idle by periodically sending NOOP commands to the server.
* </p>
diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClient.java b/src/main/java/org/apache/commons/net/ftp/FTPClient.java
index 37aef6f6..b0a766fd 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java
@@ -145,7 +145,7 @@ import org.apache.commons.net.util.NetConstants;
* method encountering that reply will throw an {@link org.apache.commons.net.ftp.FTPConnectionClosedException}. {@link FTPConnectionClosedException} is a
* subclass of {@code IOException} and therefore need not be caught separately, but if you are going to catch it separately, its catch block must appear before
* the more general {@code IOException} catch block. When you encounter an {@link org.apache.commons.net.ftp.FTPConnectionClosedException} , you must disconnect
- * the connection with {@link #disconnect disconnect() } to properly clean up the system resources used by FTPClient. Before disconnecting, you may check the
+ * the connection with {@link #disconnect disconnect()} to properly clean up the system resources used by FTPClient. Before disconnecting, you may check the
* last reply code and text with {@link org.apache.commons.net.ftp.FTP#getReplyCode getReplyCode }, {@link org.apache.commons.net.ftp.FTP#getReplyString
* getReplyString }, and {@link org.apache.commons.net.ftp.FTP#getReplyStrings getReplyStrings}. You may avoid server disconnections while the client is idle by
* periodically sending NOOP commands to the server.
@@ -1368,7 +1368,7 @@ public class FTPClient extends FTP implements Configurable {
* Sets the current data connection mode to {@code ACTIVE_REMOTE_DATA_CONNECTION}. Use this method only for server to server data transfers. This method
* issues a PORT command to the server, indicating the other server and port to which it should connect for data transfers. You must call this method before
* EVERY server to server transfer attempt. The FTPClient will NOT automatically continue to issue PORT commands. You also must remember to call
- * {@link #enterLocalActiveMode enterLocalActiveMode() } if you wish to return to the normal data connection mode.
+ * {@link #enterLocalActiveMode enterLocalActiveMode()} if you wish to return to the normal data connection mode.
*
* @param host The passive mode server accepting connections for data transfers.
* @param port The passive mode server's data port.
@@ -1392,7 +1392,7 @@ public class FTPClient extends FTP implements Configurable {
* Sets the current data connection mode to {@code PASSIVE_REMOTE_DATA_CONNECTION_MODE}. Use this method only for server to server data transfers. This
* method issues a PASV command to the server, telling it to open a data port to which the active server will connect to conduct data transfers. You must
* call this method before EVERY server to server transfer attempt. The FTPClient will NOT automatically continue to issue PASV commands. You also must
- * remember to call {@link #enterLocalActiveMode enterLocalActiveMode() } if you wish to return to the normal data connection mode.
+ * remember to call {@link #enterLocalActiveMode enterLocalActiveMode()} if you wish to return to the normal data connection mode.
*
* @return True if successfully completed, false if not.
* @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client being idle or some other reason
diff --git a/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java b/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
index d36234ad..16aff0b7 100644
--- a/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
+++ b/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
@@ -204,7 +204,7 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto
// clone the config as it may be changed by the parsers (NET-602)
final FTPClientConfig config2 = config != null ? new FTPClientConfig(config) : null;
return new CompositeFileEntryParser(new FTPFileEntryParser[] { new NTFTPEntryParser(config),
- new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey())) });
+ new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey()))});
}
/**
@@ -239,7 +239,7 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto
// clone the config as it may be changed by the parsers (NET-602)
final FTPClientConfig config2 = config != null ? new FTPClientConfig(config) : null;
return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(config),
- new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey())) });
+ new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey()))});
}
/**
diff --git a/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java b/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java
index 3d626093..c1ae2abc 100644
--- a/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java
+++ b/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java
@@ -27,7 +27,7 @@ import java.io.OutputStream;
* from NETASCII.
* <p>
* Because of the translation process, a call to {@code flush()} will not flush the last byte written if that byte was a carriage return. A call to
- * {@link #close close() }, however, will flush the carriage return.
+ * {@link #close close()}, however, will flush the carriage return.
* </p>
*/
public final class FromNetASCIIOutputStream extends FilterOutputStream {
diff --git a/src/main/java/org/apache/commons/net/nntp/NNTP.java b/src/main/java/org/apache/commons/net/nntp/NNTP.java
index d80c6c62..cd749229 100644
--- a/src/main/java/org/apache/commons/net/nntp/NNTP.java
+++ b/src/main/java/org/apache/commons/net/nntp/NNTP.java
@@ -42,7 +42,7 @@ import org.apache.commons.net.io.CRLFLineReader;
* method encountering that reply will throw an {@link org.apache.commons.net.nntp.NNTPConnectionClosedException} . {@code NNTPConectionClosedException} is
* a subclass of {@code IOException} and therefore need not be caught separately, but if you are going to catch it separately, its catch block must
* appear before the more general {@code IOException} catch block. When you encounter an
- * {@link org.apache.commons.net.nntp.NNTPConnectionClosedException} , you must disconnect the connection with {@link #disconnect disconnect() } to properly
+ * {@link org.apache.commons.net.nntp.NNTPConnectionClosedException} , you must disconnect the connection with {@link #disconnect disconnect()} to properly
* clean up the system resources used by NNTP. Before disconnecting, you may check the last reply code and text with {@link #getReplyCode getReplyCode } and
* {@link #getReplyString getReplyString }.
* </p>
diff --git a/src/main/java/org/apache/commons/net/nntp/NNTPClient.java b/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
index f8305bc0..6bb2f138 100644
--- a/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
+++ b/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
@@ -36,7 +36,7 @@ import org.apache.commons.net.util.NetConstants;
/**
* NNTPClient encapsulates all the functionality necessary to post and retrieve articles from an NNTP server. As with all classes derived from
* {@link org.apache.commons.net.SocketClient}, you must first connect to the server with {@link org.apache.commons.net.SocketClient#connect connect } before
- * doing anything, and finally {@link org.apache.commons.net.nntp.NNTP#disconnect disconnect() } after you're completely finished interacting with the server.
+ * doing anything, and finally {@link org.apache.commons.net.nntp.NNTP#disconnect disconnect()} after you're completely finished interacting with the server.
* Remember that the {@link org.apache.commons.net.nntp.NNTP#isAllowedToPost isAllowedToPost()} method is defined in {@link org.apache.commons.net.nntp.NNTP}.
* <p>
* You should keep in mind that the NNTP server may choose to prematurely close a connection if the client has been idle for longer than a given time period or
@@ -46,7 +46,7 @@ import org.apache.commons.net.util.NetConstants;
* a subclass of {@code IOException} and therefore need not be caught separately, but if you are going to catch it separately, its catch block must
* appear before the more general {@code IOException} catch block. When you encounter an
* {@link org.apache.commons.net.nntp.NNTPConnectionClosedException} , you must disconnect the connection with
- * {@link org.apache.commons.net.nntp.NNTP#disconnect disconnect() } to properly clean up the system resources used by NNTP. Before disconnecting, you may check
+ * {@link org.apache.commons.net.nntp.NNTP#disconnect disconnect()} to properly clean up the system resources used by NNTP. Before disconnecting, you may check
* the last reply code and text with {@link org.apache.commons.net.nntp.NNTP#getReplyCode getReplyCode } and
* {@link org.apache.commons.net.nntp.NNTP#getReplyString getReplyString }.
* </p>
@@ -557,7 +557,7 @@ public class NNTPClient extends NNTP {
/**
* Post an article to the NNTP server. This method returns a DotTerminatedMessageWriter instance to which the article can be written. Null is returned if
- * the posting attempt fails. You should check {@link NNTP#isAllowedToPost isAllowedToPost() } before trying to post. However, a posting attempt can fail
+ * the posting attempt fails. You should check {@link NNTP#isAllowedToPost isAllowedToPost()} before trying to post. However, a posting attempt can fail
* due to malformed headers.
* <p>
* You must not issue any commands to the NNTP server (i.e., call any (other methods) until you finish writing to the returned Writer instance and close it.
@@ -572,7 +572,7 @@ public class NNTPClient extends NNTP {
* line-leading dots and ending the message with a single dot upon closing, so all you have to worry about is writing the header and the message.
* </p>
* <p>
- * Upon closing the returned Writer, you need to call {@link #completePendingCommand completePendingCommand() } to finalize the posting and verify its
+ * Upon closing the returned Writer, you need to call {@link #completePendingCommand completePendingCommand()} to finalize the posting and verify its
* success or failure from the server reply.
* </p>
*
diff --git a/src/main/java/org/apache/commons/net/pop3/POP3.java b/src/main/java/org/apache/commons/net/pop3/POP3.java
index 913ade7d..fcd73ba9 100644
--- a/src/main/java/org/apache/commons/net/pop3/POP3.java
+++ b/src/main/java/org/apache/commons/net/pop3/POP3.java
@@ -179,7 +179,7 @@ public class POP3 extends SocketClient {
/**
* Gets the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines. If the reply is
- * a single line, but its format ndicates it should be a multiline reply, then you must call {@link #getAdditionalReply getAdditionalReply() } to fetch the
+ * a single line, but its format ndicates it should be a multiline reply, then you must call {@link #getAdditionalReply getAdditionalReply()} to fetch the
* rest of the reply, and then call {@code getReplyString} again. You only have to worry about this if you are implementing your own client using the
* {@link #sendCommand sendCommand } methods.
*
@@ -198,7 +198,7 @@ public class POP3 extends SocketClient {
/**
* Gets an array of lines received as a reply to the last command sent to the server. The lines have end of lines truncated. If the reply is a single
- * line, but its format ndicates it should be a multiline reply, then you must call {@link #getAdditionalReply getAdditionalReply() } to fetch the rest of
+ * line, but its format ndicates it should be a multiline reply, then you must call {@link #getAdditionalReply getAdditionalReply()} to fetch the rest of
* the reply, and then call {@code getReplyStrings} again. You only have to worry about this if you are implementing your own client using the
* {@link #sendCommand sendCommand } methods.
*
diff --git a/src/main/java/org/apache/commons/net/pop3/POP3Client.java b/src/main/java/org/apache/commons/net/pop3/POP3Client.java
index 387be1b4..7f92b3a2 100644
--- a/src/main/java/org/apache/commons/net/pop3/POP3Client.java
+++ b/src/main/java/org/apache/commons/net/pop3/POP3Client.java
@@ -379,7 +379,7 @@ public class POP3Client extends POP3 {
*
* @param messageId The number of the message to fetch.
* @return A DotTerminatedMessageReader instance from which the entire message can be read. This can safely be cast to a {@link BufferedReader} in order to
- * use the {@link BufferedReader#readLine() } method. Returns null if the retrieval attempt fails (e.g., if the specified message number does not
+ * use the {@link BufferedReader#readLine()} method. Returns null if the retrieval attempt fails (e.g., if the specified message number does not
* exist).
* @throws IOException If a network I/O error occurs in the process of sending the retrieve message command.
*/
diff --git a/src/main/java/org/apache/commons/net/smtp/SMTP.java b/src/main/java/org/apache/commons/net/smtp/SMTP.java
index ac5e54eb..3d26c25d 100644
--- a/src/main/java/org/apache/commons/net/smtp/SMTP.java
+++ b/src/main/java/org/apache/commons/net/smtp/SMTP.java
@@ -44,7 +44,7 @@ import org.apache.commons.net.util.NetConstants;
* {@code SMTPConnectionClosedException} is a subclass of {@code IOException} and therefore need not be caught separately, but if you are going to
* catch it separately, its catch block must appear before the more general {@code IOException} catch block. When you encounter an
* {@link org.apache.commons.net.smtp.SMTPConnectionClosedException} , you must disconnect the connection with
- * {@link org.apache.commons.net.SocketClient#disconnect disconnect() } to properly clean up the system resources used by SMTP. Before disconnecting, you may
+ * {@link org.apache.commons.net.SocketClient#disconnect disconnect()} to properly clean up the system resources used by SMTP. Before disconnecting, you may
* check the last reply code and text with {@link #getReplyCode getReplyCode }, {@link #getReplyString getReplyString }, and {@link #getReplyStrings
* getReplyStrings}.
* </p>
diff --git a/src/main/java/org/apache/commons/net/smtp/SMTPClient.java b/src/main/java/org/apache/commons/net/smtp/SMTPClient.java
index 04bbd48d..c0eecfa9 100644
--- a/src/main/java/org/apache/commons/net/smtp/SMTPClient.java
+++ b/src/main/java/org/apache/commons/net/smtp/SMTPClient.java
@@ -74,7 +74,7 @@ import org.apache.commons.net.io.DotTerminatedMessageWriter;
* response to a command. When that occurs, the method encountering that reply will throw an {@link org.apache.commons.net.smtp.SMTPConnectionClosedException}.
* {@code SMTPConnectionClosedException} is a subclass of {@code IOException} and therefore need not be caught separately, but if you are going to
* catch it separately, its catch block must appear before the more general {@code IOException} catch block. When you encounter an
- * {@link org.apache.commons.net.smtp.SMTPConnectionClosedException} , you must disconnect the connection with {@link #disconnect disconnect() } to properly
+ * {@link org.apache.commons.net.smtp.SMTPConnectionClosedException} , you must disconnect the connection with {@link #disconnect disconnect()} to properly
* clean up the system resources used by SMTPClient. Before disconnecting, you may check the last reply code and text with
* {@link org.apache.commons.net.smtp.SMTP#getReplyCode getReplyCode }, {@link org.apache.commons.net.smtp.SMTP#getReplyString getReplyString }, and
* {@link org.apache.commons.net.smtp.SMTP#getReplyStrings getReplyStrings}.
@@ -278,7 +278,7 @@ public class SMTPClient extends SMTP {
* about is writing the header and the message.
* </p>
* <p>
- * Upon closing the returned Writer, you need to call {@link #completePendingCommand completePendingCommand() } to finalize the transaction and verify its
+ * Upon closing the returned Writer, you need to call {@link #completePendingCommand completePendingCommand()} to finalize the transaction and verify its
* success or failure from the server reply.
* </p>
*
@@ -310,8 +310,8 @@ public class SMTPClient extends SMTP {
}
/**
- * Sends a short messages. This method fetches the Writer returned by {@link #sendMessageData sendMessageData() } and writes the
- * specified String to it. After writing the message, this method calls {@link #completePendingCommand completePendingCommand() } to finalize the
+ * Sends a short messages. This method fetches the Writer returned by {@link #sendMessageData sendMessageData()} and writes the
+ * specified String to it. After writing the message, this method calls {@link #completePendingCommand completePendingCommand()} to finalize the
* transaction and returns its success or failure.
*
* @param message The short email message to send. This must include the headers and the body, but not the trailing "."
diff --git a/src/main/java/org/apache/commons/net/telnet/TelnetClient.java b/src/main/java/org/apache/commons/net/telnet/TelnetClient.java
index 60556fe4..066cb999 100644
--- a/src/main/java/org/apache/commons/net/telnet/TelnetClient.java
+++ b/src/main/java/org/apache/commons/net/telnet/TelnetClient.java
@@ -30,8 +30,8 @@ import org.apache.commons.io.IOUtils;
* extra Telnet options because it is meant to be used within a Java program providing automated access to Telnet accessible resources.
* <p>
* The class can be used by first connecting to a server using the SocketClient {@link org.apache.commons.net.SocketClient#connect connect} method. Then an
- * InputStream and OutputStream for sending and receiving data over the Telnet connection can be obtained by using the {@link #getInputStream getInputStream() }
- * and {@link #getOutputStream getOutputStream() } methods. When you finish using the streams, you must call {@link #disconnect disconnect } rather than simply
+ * InputStream and OutputStream for sending and receiving data over the Telnet connection can be obtained by using the {@link #getInputStream getInputStream()}
+ * and {@link #getOutputStream getOutputStream()} methods. When you finish using the streams, you must call {@link #disconnect disconnect } rather than simply
* closing the streams.
* </p>
*/
diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPClient.java b/src/main/java/org/apache/commons/net/tftp/TFTPClient.java
index 16598fbb..35bfe46f 100644
--- a/src/main/java/org/apache/commons/net/tftp/TFTPClient.java
+++ b/src/main/java/org/apache/commons/net/tftp/TFTPClient.java
@@ -32,9 +32,9 @@ import org.apache.commons.net.io.ToNetASCIIInputStream;
* The TFTPClient class encapsulates all the aspects of the TFTP protocol necessary to receive and send files through TFTP. It is derived from the
* {@link org.apache.commons.net.tftp.TFTP} because it is more convenient than using aggregation, and as a result exposes the same set of methods to allow you
* to deal with the TFTP protocol directly. However, almost every user should only be concerend with the the
- * {@link org.apache.commons.net.DatagramSocketClient#open open() }, {@link org.apache.commons.net.DatagramSocketClient#close close() }, {@link #sendFile
- * sendFile() }, and {@link #receiveFile receiveFile() } methods. Additionally, the {@link #setMaxTimeouts setMaxTimeouts() } and
- * {@link org.apache.commons.net.DatagramSocketClient#setDefaultTimeout setDefaultTimeout() } methods may be of importance for performance tuning.
+ * {@link org.apache.commons.net.DatagramSocketClient#open open()}, {@link org.apache.commons.net.DatagramSocketClient#close close()}, {@link #sendFile
+ * sendFile()}, and {@link #receiveFile receiveFile()} methods. Additionally, the {@link #setMaxTimeouts setMaxTimeouts()} and
+ * {@link org.apache.commons.net.DatagramSocketClient#setDefaultTimeout setDefaultTimeout()} methods may be of importance for performance tuning.
* <p>
* Details regarding the TFTP protocol and the format of TFTP packets can be found in RFC 783. But the point of these classes is to keep you from having to
* worry about the internals.
diff --git a/src/main/java/org/apache/commons/net/time/TimeTCPClient.java b/src/main/java/org/apache/commons/net/time/TimeTCPClient.java
index 64581e61..ba244edf 100644
--- a/src/main/java/org/apache/commons/net/time/TimeTCPClient.java
+++ b/src/main/java/org/apache/commons/net/time/TimeTCPClient.java
@@ -25,7 +25,7 @@ import org.apache.commons.net.SocketClient;
/**
* The TimeTCPClient class is a TCP implementation of a client for the Time protocol described in RFC 868. To use the class, merely establish a connection with
- * {@link org.apache.commons.net.SocketClient#connect connect } and call either {@link #getTime getTime() } or {@link #getDate getDate() } to retrieve the time,
+ * {@link org.apache.commons.net.SocketClient#connect connect } and call either {@link #getTime getTime()} or {@link #getDate getDate()} to retrieve the time,
* then call {@link org.apache.commons.net.SocketClient#disconnect disconnect } to close the connection properly.
*
*
diff --git a/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java b/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java
index e630fe68..25c63b0a 100644
--- a/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java
+++ b/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java
@@ -123,7 +123,7 @@ public final class KeyManagerUtils {
@Override
public String[] getClientAliases(final String keyType, final Principal[] issuers) {
- return new String[] { keyStore.getAlias() };
+ return new String[] { keyStore.getAlias()};
}
// Call sequence: 3
diff --git a/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserAdditionalTest.java b/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserAdditionalTest.java
index 68af2a66..2b89f581 100644
--- a/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserAdditionalTest.java
+++ b/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserAdditionalTest.java
@@ -59,7 +59,7 @@ public class OS400FTPEntryParserAdditionalTest extends CompositeFTPParseTestFram
@Override
protected FTPFileEntryParser getParser() {
- return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(), new UnixFTPEntryParser() });
+ return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(), new UnixFTPEntryParser()});
}
@Override
diff --git a/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java b/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java
index b67b4f78..8d5d2b74 100644
--- a/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java
+++ b/src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java
@@ -77,7 +77,7 @@ public class OS400FTPEntryParserTest extends CompositeFTPParseTestFramework {
*/
@Override
protected FTPFileEntryParser getParser() {
- return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(), new UnixFTPEntryParser() });
+ return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(), new UnixFTPEntryParser()});
}
@Override
(commons-net) 01/02: Internal refactoring for a magic number
Posted by gg...@apache.org.
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 7d6ed72ef3d357e176ad4159ca71e4b273176c3c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Mar 5 08:46:36 2025 -0500
Internal refactoring for a magic number
Fix odd Javadoc formatting of inline @link tags
---
.../java/org/apache/commons/net/tftp/TFTP.java | 24 +++++++++++++---------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/apache/commons/net/tftp/TFTP.java b/src/main/java/org/apache/commons/net/tftp/TFTP.java
index 215b61e5..71faaff2 100644
--- a/src/main/java/org/apache/commons/net/tftp/TFTP.java
+++ b/src/main/java/org/apache/commons/net/tftp/TFTP.java
@@ -27,9 +27,9 @@ import org.apache.commons.net.DatagramSocketClient;
/**
* The TFTP class exposes a set of methods to allow you to deal with the TFTP protocol directly, in case you want to write your own TFTP client or server.
- * However, almost every user should only be concerend with the {@link org.apache.commons.net.DatagramSocketClient#open open() }, and
- * {@link org.apache.commons.net.DatagramSocketClient#close close() }, methods. Additionally,the a
- * {@link org.apache.commons.net.DatagramSocketClient#setDefaultTimeout setDefaultTimeout() } method may be of importance for performance tuning.
+ * However, almost every user should only be concerend with the {@link org.apache.commons.net.DatagramSocketClient#open open()}, and
+ * {@link org.apache.commons.net.DatagramSocketClient#close close()}, methods. Additionally,the a
+ * {@link org.apache.commons.net.DatagramSocketClient#setDefaultTimeout setDefaultTimeout()} method may be of importance for performance tuning.
* <p>
* Details regarding the TFTP protocol and the format of TFTP packets can be found in RFC 783. But the point of these classes is to keep you from having to
* worry about the internals.
@@ -40,9 +40,13 @@ import org.apache.commons.net.DatagramSocketClient;
* @see TFTPPacketException
* @see TFTPClient
*/
-
public class TFTP extends DatagramSocketClient {
+ /**
+ * The header size.
+ */
+ private static final int HEADER_SIZE = 4;
+
/**
* The ASCII transfer mode. Its value is 0 and equivalent to NETASCII_MODE
*/
@@ -91,7 +95,7 @@ public class TFTP extends DatagramSocketClient {
/**
* The size to use for TFTP packet buffers. Its 4 plus the TFTPPacket.SEGMENT_SIZE, i.e. 516.
*/
- static final int PACKET_SIZE = TFTPPacket.SEGMENT_SIZE + 4;
+ static final int PACKET_SIZE = TFTPPacket.SEGMENT_SIZE + HEADER_SIZE;
/**
* Returns the TFTP string representation of a TFTP transfer mode. Will throw an ArrayIndexOutOfBoundsException if an invalid transfer mode is specified.
@@ -134,9 +138,9 @@ public class TFTP extends DatagramSocketClient {
}
/**
- * Initializes the internal buffers. Buffers are used by {@link #bufferedSend bufferedSend() } and {@link #bufferedReceive bufferedReceive() }. This method
+ * Initializes the internal buffers. Buffers are used by {@link #bufferedSend bufferedSend()} and {@link #bufferedReceive bufferedReceive()}. This method
* must be called before calling either one of those two methods. When you finish using buffered operations, you must call {@link #endBufferedOps
- * endBufferedOps() }.
+ * endBufferedOps()}.
*/
public final void beginBufferedOps() {
receiveBuffer = new byte[packetSize];
@@ -147,7 +151,7 @@ public class TFTP extends DatagramSocketClient {
}
/**
- * This is a special method to perform a more efficient packet receive. It should only be used after calling {@link #beginBufferedOps beginBufferedOps() }.
+ * This is a special method to perform a more efficient packet receive. It should only be used after calling {@link #beginBufferedOps beginBufferedOps()}.
* beginBufferedOps() initializes a set of buffers used internally that prevent the new allocation of a DatagramPacket and byte array for each send and
* receive. To use these buffers you must call the bufferedReceive() and bufferedSend() methods instead of send() and receive(). You must also be certain
* that you don't manipulate the resulting packet in such a way that it interferes with future buffered operations. For example, a TFTPDataPacket received
@@ -173,7 +177,7 @@ public class TFTP extends DatagramSocketClient {
}
/**
- * This is a special method to perform a more efficient packet send. It should only be used after calling {@link #beginBufferedOps beginBufferedOps() }.
+ * This is a special method to perform a more efficient packet send. It should only be used after calling {@link #beginBufferedOps beginBufferedOps()}.
* beginBufferedOps() initializes a set of buffers used internally that prevent the new allocation of a DatagramPacket and byte array for each send and
* receive. To use these buffers you must call the bufferedReceive() and bufferedSend() methods instead of send() and receive(). You must also be certain
* that you don't manipulate the resulting packet in such a way that it interferes with future buffered operations. For example, a TFTPDataPacket received
@@ -277,7 +281,7 @@ public class TFTP extends DatagramSocketClient {
*/
public final void resetBuffersToSize(final int packetSize) {
// the packet size should be between 8 - 65464 (inclusively) then we add 4 for the header
- this.packetSize = Math.min(Math.max(packetSize, 8), 65464) + 4;
+ this.packetSize = Math.min(Math.max(packetSize, 8), 65464) + HEADER_SIZE;
// if the buffers are already initialized reinitialize
if (buffersInitialized) {
endBufferedOps();