[GitHub] [commons-net] sebbASF commented on a diff in pull request #141: Fixes many grammar issues and typos in JavaDoc and code comments

2023-01-18 Thread GitBox


sebbASF commented on code in PR #141:
URL: https://github.com/apache/commons-net/pull/141#discussion_r1080653735


##
src/main/java/org/apache/commons/net/ftp/FTPSClient.java:
##
@@ -375,7 +375,7 @@ public int execADAT(final byte[] data) throws IOException {
 /**
  * AUTH command.
  *
- * @throws SSLException If it server reply code not equal "234" and "334".
+ * @throws SSLException If the server reply code ss equal to neither "234" 
nor "334".

Review Comment:
   Does not read well; and what is 'ss' ?
   Might be better to put:
   
   If the server reply code equals neither "234" nor "334".



##
src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java:
##
@@ -57,7 +57,7 @@ public class VMSFTPEntryParser extends 
ConfigurableFTPFileEntryParserImpl {
 /**
  * Constructor for a VMSFTPEntryParser object.
  *
- * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. It it is seen, this is 
a
+ * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. If it is seen, this is 
a

Review Comment:
   This should agree with the wording above



##
src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java:
##
@@ -68,7 +68,7 @@ public VMSFTPEntryParser() {
  * This constructor allows the creation of a VMSFTPEntryParser object with 
something other than the default configuration.
  *
  * @param config The {@link FTPClientConfig configuration} object used to 
configure this parser.
- * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. It it is seen, this is 
a
+ * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. If it is seen, this is 
a

Review Comment:
   Ditto



##
src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java:
##
@@ -437,8 +437,8 @@ private FTPFile parseMemberList(final String entry) {
 }
 
 /**
- * preParse is called as part of the interface. Per definition is is 
called before the parsing takes place. Three kind of lists is recognize: 
z/OS-MVS File
- * lists z/OS-MVS Member lists unix file lists
+ * preParse is called as part of the interface. Per definition, it is 
called before the parsing takes place. Three kinds of lists are recognized:
+ * z/OS-MVS File lists z/OS-MVS Member lists unix file lists

Review Comment:
   Need some delimiters - e.g. commas - to show the lists clearly.
   Better would be to use a list.



##
src/main/java/org/apache/commons/net/imap/IMAPReply.java:
##
@@ -74,7 +74,7 @@ public final class IMAPReply {
 private static final Pattern LITERAL_PATTERN = 
Pattern.compile("\\{(\\d+)\\}$"); // {dd}
 
 /**
- * Intepret the String reply code - OK, NO, BAD - in a tagged response as 
a integer.
+ * Intepret the String reply code - OK, NO, BAD - in a tagged response as 
an integer.

Review Comment:
   interpret



##
src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java:
##
@@ -61,7 +61,7 @@ public VMSVersioningFTPEntryParser() {
  * This constructor allows the creation of a VMSVersioningFTPEntryParser 
object with something other than the default configuration.
  *
  * @param config The {@link FTPClientConfig configuration} object used to 
configure this parser.
- * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. It it is seen, this is 
a
+ * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. If it is seen, this is 
a

Review Comment:
   Ditto



##
src/main/java/org/apache/commons/net/telnet/Telnet.java:
##
@@ -980,7 +980,7 @@ boolean stateIsDo(final int option) {
 /**
  * Looks for the state of the option.
  *
- * @return returns true if a dont has been acknowledged
+ * @return returns true if a {@code dont} has been acknowledged

Review Comment:
   DONT



##
src/main/java/org/apache/commons/net/telnet/Telnet.java:
##
@@ -633,7 +633,7 @@ final synchronized void requestDont(final int option) 
throws IOException {
 /**
  * Looks for the state of the option.
  *
- * @return returns true if a do has been reuqested
+ * @return returns true if a {@code do} has been requested.

Review Comment:
   do => DO



##
src/main/java/org/apache/commons/net/telnet/Telnet.java:
##
@@ -969,7 +969,7 @@ void spyWrite(final int ch) {
 /**
  * Looks for the state of the option.
  *
- * @return returns true if a do has been acknowledged
+ * @return returns true if a 

[GitHub] [commons-net] sebbASF commented on a diff in pull request #141: Fixes many grammar issues and typos in JavaDoc and code comments

2023-01-15 Thread GitBox


sebbASF commented on code in PR #141:
URL: https://github.com/apache/commons-net/pull/141#discussion_r1070583181


##
src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java:
##
@@ -110,7 +110,7 @@ public class UnixFTPEntryParser extends 
ConfigurableFTPFileEntryParserImpl {
 /**
  * The default constructor for a UnixFTPEntryParser object.
  *
- * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. It it is seen, this is 
a
+ * @throws IllegalArgumentException Thrown if the regular expression is 
unparseable. Should not be seen under normal conditions. If it is seen, this is 
a

Review Comment:
   Disagree on changing from seen to thrown, as that breaks the connection to 
the previous sentence.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-net] sebbASF commented on a diff in pull request #141: Fixes many grammar issues and typos in JavaDoc and code comments

2023-01-15 Thread GitBox


sebbASF commented on code in PR #141:
URL: https://github.com/apache/commons-net/pull/141#discussion_r1070574537


##
src/main/java/org/apache/commons/net/ftp/FTPSClient.java:
##
@@ -375,7 +375,7 @@ public int execADAT(final byte[] data) throws IOException {
 /**
  * AUTH command.
  *
- * @throws SSLException If it server reply code not equal "234" and "334".
+ * @throws SSLException If the server reply code does not equal "234" and 
"334".

Review Comment:
   ```Does not equal “234” and “334”``` will never be true.
   This should be
   ```Does not equal either of “234” or “334”```
   Or
   ```Does not equal “234” and does not equal “334”```
   Or
   ```Is equal to neither “234” nor “334”```



##
src/main/java/org/apache/commons/net/nntp/NNTPClient.java:
##
@@ -416,7 +416,7 @@ public String listHelp() throws IOException {
 }
 
 /**
- * List all new articles added to the NNTP server since a particular date 
subject to the conditions of the specified query. If no new new news is found, a
+ * List all new articles added to the NNTP server since a particular date 
subject to the conditions of the specified query. If no recent news is found, a

Review Comment:
   News that is new is not necessarily recent. That depends on the date



##
src/main/java/org/apache/commons/net/SocketClient.java:
##
@@ -632,7 +632,7 @@ public void setDefaultPort(final int port) {
 
 /**
  * Set the default timeout in milliseconds to use when opening a socket. 
This value is only used previous to a call to {@link #connect connect()} and 
should
- * not be confused with {@link #setSoTimeout setSoTimeout()} which 
operates on an the currently opened socket. _timeout_ contains the new timeout 
value.
+ * not be confused with {@link #setSoTimeout setSoTimeout()} which 
operates on any of the currently opened socket. _timeout_ contains the new 
timeout value.

Review Comment:
   That is the wrong fix. Instead the word ‘an’ should just have been deleted.



##
src/main/java/org/apache/commons/net/telnet/Telnet.java:
##
@@ -666,7 +666,7 @@ boolean requestedWill(final int option) {
 /**
  * Looks for the state of the option.
  *
- * @return returns true if a wont has been reuqested
+ * @return returns true if a won't has been requested

Review Comment:
   The command is “wont”, not “won’t”. Though maybe the commands should be 
listed as “WONT”



##
src/main/java/org/apache/commons/net/smtp/SimpleSMTPHeader.java:
##
@@ -90,8 +90,8 @@ public void addCC(final String address) {
 }
 
 /**
- * Adds an arbitrary header field with the given value to the article 
header. These headers will be written before the From, To, Subject, and Cc 
fields when
- * the SimpleSMTPHeader is convertered to a string. An example use would 
be:
+ * Adds an arbitrary header field with the given value to the article 
header. These headers will be written before the
+ * {@code From}, To, Subject, and Cc fields when the SimpleSMTPHeader is 
converted to a string. An example use would be:

Review Comment:
   Why only add code to From?



##
src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java:
##
@@ -437,7 +437,7 @@ private FTPFile parseMemberList(final String entry) {
 }
 
 /**
- * preParse is called as part of the interface. Per definition is is 
called before the parsing takes place. Three kind of lists is recognize: 
z/OS-MVS File
+ * preParse is called as part of the interface. Per definition it is 
called before the parsing takes place. Three kind of lists are recognize: 
z/OS-MVS File

Review Comment:
   Three kindS of list are recogniseD - caps show missing letters



##
src/main/java/org/apache/commons/net/examples/unix/rlogin.java:
##
@@ -25,14 +25,14 @@
 /**
  * This is an example program demonstrating how to use the RLoginClient class. 
This program connects to an rlogin daemon and begins to interactively read input
  * from stdin (this will be line buffered on most systems, so don't expect 
character at a time interactivity), passing it to the remote login process and
- * writing the remote stdout and stderr to local stdout. If you don't have 
.rhosts or hosts.equiv files set up, the rlogin daemon will prompt you for a
- * password.
+ * writing the remote stdout and stderr to local stdout. If you don't have 
{@code .rhosts} or {@code hosts.equiv} files set up, the rlogin daemon will 
prompt
+ * you for a password.
  * 
  * On Unix systems you will not be able to use the rshell capability unless 
the process runs as root since only root can bind port addresses lower than 
1024.
  * 
  * JVM's using green threads will likely have problems if the rlogin daemon 
requests a password. This program is merely a demonstration and is not suitable 
for
- * use as an application, especially given that it relies on line buffered