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/02/12 16:39:54 UTC
(commons-net) branch master updated (0d7a6a43 -> 113b6b69)
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 0d7a6a43 Fix Javadoc warnings
new 9fd70424 Fix Javadoc warnings
new 113b6b69 Fix redundant Javadoc phrasing
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:
.../org/apache/commons/net/bsd/RExecClient.java | 2 +
.../apache/commons/net/ftp/FTPClientConfig.java | 14 ++--
.../java/org/apache/commons/net/ftp/FTPCmd.java | 6 +-
.../net/ftp/parser/FTPTimestampParserImpl.java | 16 +++--
.../org/apache/commons/net/nntp/NNTPClient.java | 4 +-
.../org/apache/commons/net/ntp/NtpV3Packet.java | 81 ++++++++++++++++------
.../java/org/apache/commons/net/telnet/Telnet.java | 16 ++---
.../org/apache/commons/net/tftp/TFTPClient.java | 10 ++-
8 files changed, 100 insertions(+), 49 deletions(-)
(commons-net) 02/02: Fix redundant Javadoc phrasing
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 113b6b69e81d49242715ac344346e404eb348b73
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Wed Feb 12 11:39:47 2025 -0500
Fix redundant Javadoc phrasing
---
.../java/org/apache/commons/net/ftp/FTPClientConfig.java | 14 +++++++-------
.../commons/net/ftp/parser/FTPTimestampParserImpl.java | 12 ++++++------
.../java/org/apache/commons/net/nntp/NNTPClient.java | 4 ++--
src/main/java/org/apache/commons/net/telnet/Telnet.java | 16 ++++++++--------
4 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java b/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
index aef81151..4aa1f9a8 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
@@ -402,7 +402,7 @@ public class FTPClientConfig {
/**
* getter for the {@link #setDefaultDateFormatStr(String) defaultDateFormatStr} property.
*
- * @return Returns the defaultDateFormatStr property.
+ * @return the defaultDateFormatStr property.
*/
public String getDefaultDateFormatStr() {
return defaultDateFormatStr;
@@ -411,7 +411,7 @@ public class FTPClientConfig {
/**
* getter for the {@link #setRecentDateFormatStr(String) recentDateFormatStr} property.
*
- * @return Returns the recentDateFormatStr property.
+ * @return the recentDateFormatStr property.
*/
public String getRecentDateFormatStr() {
@@ -423,7 +423,7 @@ public class FTPClientConfig {
* getter for the {@link #setServerLanguageCode(String) serverLanguageCode} property.
* </p>
*
- * @return Returns the serverLanguageCode property.
+ * @return the serverLanguageCode property.
*/
public String getServerLanguageCode() {
return serverLanguageCode;
@@ -434,7 +434,7 @@ public class FTPClientConfig {
* {@code FTPClientConfig.SYST_*} codes or else the fully qualified class name of a parser implementing both the {@code FTPFileEntryParser} and
* {@code Configurable} interfaces.
*
- * @return Returns the serverSystemKey property.
+ * @return the serverSystemKey property.
*/
public String getServerSystemKey() {
return serverSystemKey;
@@ -443,7 +443,7 @@ public class FTPClientConfig {
/**
* getter for the {@link #setServerTimeZoneId(String) serverTimeZoneId} property.
*
- * @return Returns the serverTimeZoneId property.
+ * @return the serverTimeZoneId property.
*/
public String getServerTimeZoneId() {
return serverTimeZoneId;
@@ -454,7 +454,7 @@ public class FTPClientConfig {
* getter for the {@link #setShortMonthNames(String) shortMonthNames} property.
* </p>
*
- * @return Returns the shortMonthNames.
+ * @return the shortMonthNames.
*/
public String getShortMonthNames() {
return shortMonthNames;
@@ -476,7 +476,7 @@ public class FTPClientConfig {
* getter for the {@link #setLenientFutureDates(boolean) lenientFutureDates} property.
* </p>
*
- * @return Returns the lenientFutureDates (default true).
+ * @return the lenientFutureDates (default true).
* @since 1.5
*/
public boolean isLenientFutureDates() {
diff --git a/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java b/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
index 849240ec..97f2d7d1 100644
--- a/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
+++ b/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
@@ -177,35 +177,35 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable
}
/**
- * @return Returns the defaultDateFormat.
+ * @return the defaultDateFormat.
*/
public SimpleDateFormat getDefaultDateFormat() {
return defaultDateFormat;
}
/**
- * @return Returns the defaultDateFormat pattern string.
+ * @return the defaultDateFormat pattern string.
*/
public String getDefaultDateFormatString() {
return defaultDateFormat.toPattern();
}
/**
- * @return Returns the recentDateFormat.
+ * @return the recentDateFormat.
*/
public SimpleDateFormat getRecentDateFormat() {
return recentDateFormat;
}
/**
- * @return Returns the recentDateFormat.
+ * @return the recentDateFormat.
*/
public String getRecentDateFormatString() {
return recentDateFormat.toPattern();
}
/**
- * @return Returns the serverTimeZone used by this parser.
+ * @return the serverTimeZone used by this parser.
*/
public TimeZone getServerTimeZone() {
return defaultDateFormat.getTimeZone();
@@ -221,7 +221,7 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable
}
/**
- * @return Returns the lenientFutureDates.
+ * @return the lenientFutureDates.
*/
boolean isLenientFutureDates() {
return lenientFutureDates;
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 87c8f42e..d9d02f5d 100644
--- a/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
+++ b/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
@@ -1105,7 +1105,7 @@ public class NNTPClient extends NNTP {
* See {@link NNTP#xover} for legal agument formats. Alternatively, read RFC 2980 :-)
*
* @param articleRange
- * @return Returns a DotTerminatedMessageReader if successful, null otherwise
+ * @return a DotTerminatedMessageReader if successful, null otherwise
* @throws IOException
*/
private BufferedReader retrieveArticleInfo(final String articleRange) throws IOException {
@@ -1174,7 +1174,7 @@ public class NNTPClient extends NNTP {
*
* @param header
* @param articleRange
- * @return Returns a {@link DotTerminatedMessageReader} if successful, {@code null} otherwise
+ * @return a {@link DotTerminatedMessageReader} if successful, {@code null} otherwise
* @throws IOException
*/
private BufferedReader retrieveHeader(final String header, final String articleRange) throws IOException {
diff --git a/src/main/java/org/apache/commons/net/telnet/Telnet.java b/src/main/java/org/apache/commons/net/telnet/Telnet.java
index ac77eea2..0f0c7c42 100644
--- a/src/main/java/org/apache/commons/net/telnet/Telnet.java
+++ b/src/main/java/org/apache/commons/net/telnet/Telnet.java
@@ -635,7 +635,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code DO} has been requested.
+ * @return true if a {@code DO} has been requested.
* @param option option code to be looked up.
*/
boolean requestedDo(final int option) {
@@ -645,7 +645,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code DONT} has been requested
+ * @return true if a {@code DONT} has been requested
* @param option option code to be looked up.
*/
boolean requestedDont(final int option) {
@@ -655,7 +655,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code WILL} has been requested
+ * @return true if a {@code WILL} has been requested
* @param option option code to be looked up.
*/
boolean requestedWill(final int option) {
@@ -665,7 +665,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code WONT} has been requested
+ * @return true if a {@code WONT} has been requested
* @param option option code to be looked up.
*/
boolean requestedWont(final int option) {
@@ -967,7 +967,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code DO} has been acknowledged.
+ * @return true if a {@code DO} has been acknowledged.
* @param option option code to be looked up.
*/
boolean stateIsDo(final int option) {
@@ -977,7 +977,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code DONT} has been acknowledged
+ * @return true if a {@code DONT} has been acknowledged
* @param option option code to be looked up.
*/
boolean stateIsDont(final int option) {
@@ -987,7 +987,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code WILL} has been acknowledged
+ * @return true if a {@code WILL} has been acknowledged
* @param option option code to be looked up.
*/
boolean stateIsWill(final int option) {
@@ -997,7 +997,7 @@ class Telnet extends SocketClient {
/**
* Looks for the state of the option.
*
- * @return returns true if a {@code WONT} has been acknowledged
+ * @return true if a {@code WONT} has been acknowledged
* @param option option code to be looked up.
*/
boolean stateIsWont(final int option) {
(commons-net) 01/02: Fix Javadoc warnings
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 9fd704244878e56d37b236bf3a561f6510518f59
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Wed Feb 12 11:39:29 2025 -0500
Fix Javadoc warnings
---
.../org/apache/commons/net/bsd/RExecClient.java | 2 +
.../java/org/apache/commons/net/ftp/FTPCmd.java | 6 +-
.../net/ftp/parser/FTPTimestampParserImpl.java | 4 +-
.../org/apache/commons/net/ntp/NtpV3Packet.java | 81 ++++++++++++++++------
.../org/apache/commons/net/tftp/TFTPClient.java | 10 ++-
5 files changed, 77 insertions(+), 26 deletions(-)
diff --git a/src/main/java/org/apache/commons/net/bsd/RExecClient.java b/src/main/java/org/apache/commons/net/bsd/RExecClient.java
index b48b9ad9..1e173f8e 100644
--- a/src/main/java/org/apache/commons/net/bsd/RExecClient.java
+++ b/src/main/java/org/apache/commons/net/bsd/RExecClient.java
@@ -51,6 +51,8 @@ import org.apache.commons.net.util.NetConstants;
public class RExecClient extends SocketClient {
/**
+ * The {@code NUL} character.
+ *
* @since 3.3
*/
protected static final char NULL_CHAR = '\0';
diff --git a/src/main/java/org/apache/commons/net/ftp/FTPCmd.java b/src/main/java/org/apache/commons/net/ftp/FTPCmd.java
index 1979a4d5..884c4cc6 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPCmd.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPCmd.java
@@ -118,7 +118,11 @@ public enum FTPCmd {
/** FTP command. */
SITE,
- /** @since 3.7 */
+ /**
+ * FTP command.
+ *
+ * @since 3.7
+ */
SIZE,
/** FTP command. */
diff --git a/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java b/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
index 42820df9..849240ec 100644
--- a/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
+++ b/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
@@ -212,7 +212,9 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable
}
/**
- * @return returns an array of 12 strings representing the short month names used by this parse.
+ * Gets an array of 12 strings representing the short month names used by this parse.
+ *
+ * @return an array of 12 strings representing the short month names used by this parse.
*/
public String[] getShortMonths() {
return defaultDateFormat.getDateFormatSymbols().getShortMonths();
diff --git a/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java b/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java
index 5f8dcc39..1dda02ee 100644
--- a/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java
+++ b/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java
@@ -127,104 +127,142 @@ public interface NtpV3Packet {
String TYPE_DAYTIME = "DAYTIME"; // RFC-867
/**
- * @return a datagram packet with the NTP parts already filled in
+ * Gets a datagram packet with the NTP parts already filled in.
+ *
+ * @return a datagram packet with the NTP parts already filled in.
*/
DatagramPacket getDatagramPacket();
/**
- * @return leap indicator as defined in RFC-1305
+ * gets the leap indicator as defined in RFC-1305.
+ *
+ * @return the leap indicator as defined in RFC-1305.
*/
int getLeapIndicator();
/**
- * @return mode as defined in RFC-1305
+ * Gets the mode as defined in RFC-1305.
+ *
+ * @return the mode as defined in RFC-1305.
*/
int getMode();
/**
- * @return mode as human readable string; e.g. 3=Client
+ * Gets the mode as human readable string; for example, 3=Client.
+ *
+ * @return the mode as human readable string; for example, 3=Client.
*/
String getModeName();
/**
- * @return the {@code originate} time as defined in RFC-1305
+ * Gets the {@code originate} time as defined in RFC-1305.
+ *
+ * @return the {@code originate} time as defined in RFC-1305.
*/
TimeStamp getOriginateTimeStamp();
/**
- * @return poll interval as defined in RFC-1305. Field range between NTP_MINPOLL and NTP_MAXPOLL.
+ * Gets the poll interval as defined in RFC-1305. Field range between NTP_MINPOLL and NTP_MAXPOLL.
+ *
+ * @return the poll interval as defined in RFC-1305. Field range between NTP_MINPOLL and NTP_MAXPOLL.
*/
int getPoll();
/**
- * @return precision as defined in RFC-1305
+ * Gets the precision as defined in RFC-1305.
+ *
+ * @return the precision as defined in RFC-1305.
*/
int getPrecision();
/**
- * @return the {@code receive} time as defined in RFC-1305
+ * Gets the {@code receive} time as defined in RFC-1305.
+ *
+ * @return the {@code receive} time as defined in RFC-1305.
*/
TimeStamp getReceiveTimeStamp();
/**
- * @return the reference id (32-bit code) as defined in RFC-1305
+ * Gets the reference id (32-bit code) as defined in RFC-1305.
+ *
+ * @return the reference id (32-bit code) as defined in RFC-1305.
*/
int getReferenceId();
/**
- * @return the reference id string
+ * Gets the reference ID string.
+ *
+ * @return the reference ID string.
*/
String getReferenceIdString();
/**
- * @return the reference time as defined in RFC-1305
+ * Gets the reference time as defined in RFC-1305.
+ *
+ * @return the reference time as defined in RFC-1305.
*/
TimeStamp getReferenceTimeStamp();
/**
- * @return root delay as defined in RFC-1305
+ * Gets the root delay as defined in RFC-1305.
+ *
+ * @return the root delay as defined in RFC-1305.
*/
int getRootDelay();
/**
- * @return root delay in milliseconds
+ * Gets root delay in milliseconds.
+ *
+ * @return root delay in milliseconds.
*/
double getRootDelayInMillisDouble();
/**
- * @return root dispersion as defined in RFC-1305
+ * Gets the root dispersion as defined in RFC-1305.
+ *
+ * @return the root dispersion as defined in RFC-1305.
*/
int getRootDispersion();
/**
- * @return root dispersion in milliseconds
+ * Gets the the root dispersion in milliseconds.
+ *
+ * @return the root dispersion in milliseconds.
*/
long getRootDispersionInMillis();
/**
- * @return root dispersion in milliseconds
+ * Gets the root dispersion in milliseconds.
+ *
+ * @return the root dispersion in milliseconds.
*/
double getRootDispersionInMillisDouble();
/**
- * @return stratum as defined in RFC-1305
+ * Gets the stratum as defined in RFC-1305.
+ *
+ * @return the stratum as defined in RFC-1305.
*/
int getStratum();
/**
- * @return the {@code transmit} timestamp as defined in RFC-1305
+ * Gets the {@code transmit} timestamp as defined in RFC-1305.
+ *
+ * @return the {@code transmit} timestamp as defined in RFC-1305.
*/
TimeStamp getTransmitTimeStamp();
/**
- * Return type of time packet. The values (e.g. NTP, TIME, ICMP, ...) correspond to the protocol used to obtain the timing information.
+ * Gets the type of time packet. The values (e.g. NTP, TIME, ICMP, ...) correspond to the protocol used to obtain the timing information.
*
* @return packet type string identifier
*/
String getType();
/**
- * @return version as defined in RFC-1305
+ * Gets version as defined in RFC-1305.
+ *
+ * @return version as defined in RFC-1305.
*/
int getVersion();
@@ -301,8 +339,9 @@ public interface NtpV3Packet {
void setRootDelay(int delay);
/**
+ * Sets the dispersion value.
*
- * @param dispersion the value to set
+ * @param dispersion the value.
* @since 3.4
*/
void setRootDispersion(int dispersion);
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 b8b4dad9..101acda9 100644
--- a/src/main/java/org/apache/commons/net/tftp/TFTPClient.java
+++ b/src/main/java/org/apache/commons/net/tftp/TFTPClient.java
@@ -70,7 +70,7 @@ public class TFTPClient extends TFTP {
}
/**
- * Returns the maximum number of times a {@code receive} attempt is allowed to timeout before ending attempts to retry the {@code receive} and failing.
+ * Gets the maximum number of times a {@code receive} attempt is allowed to timeout before ending attempts to retry the {@code receive} and failing.
*
* @return The maximum number of timeouts allowed.
*/
@@ -79,14 +79,18 @@ public class TFTPClient extends TFTP {
}
/**
- * @return The number of bytes received in the ongoing download
+ * Gets the number of bytes received in the ongoing download.
+ *
+ * @return The number of bytes received in the ongoing download.
*/
public long getTotalBytesReceived() {
return totalBytesReceived;
}
/**
- * @return The number of bytes sent in the ongoing download
+ * Gets the number of bytes sent in the ongoing download.
+ *
+ * @return The number of bytes sent in the ongoing download.
*/
public long getTotalBytesSent() {
return totalBytesSent;