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:55 UTC
(commons-net) 01/02: Fix Javadoc warnings
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;