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


The following commit(s) were added to refs/heads/master by this push:
     new d47c87e7 Fix formatting
d47c87e7 is described below

commit d47c87e7e7d95fa7ac2c6eda50b1a886ab306196
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Aug 22 10:13:19 2023 -0400

    Fix formatting
---
 .../org/apache/commons/net/examples/ftp/ServerToServerFTP.java    | 2 +-
 src/main/java/org/apache/commons/net/ftp/FTPClient.java           | 8 ++++----
 src/main/java/org/apache/commons/net/smtp/SMTPClient.java         | 4 ++--
 src/main/java/org/apache/commons/net/smtp/SimpleSMTPHeader.java   | 4 ++--
 src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java 
b/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
index 86631d3a..ade654eb 100644
--- a/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
+++ b/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
@@ -165,7 +165,7 @@ public final class ServerToServerFTP {
                 System.err.println("Couldn't initiate transfer. Check that 
file names are valid.");
                 break __main;
             }
-            // if(ftp1.remoteRetrieve(file1) && ftp2.remoteStore(file2)) {
+            // if (ftp1.remoteRetrieve(file1) && ftp2.remoteStore(file2)) {
             // We have to fetch the positive completion reply.
             ftp1.completePendingCommand();
             ftp2.completePendingCommand();
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 85471953..c169f808 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java
@@ -85,7 +85,7 @@ import org.apache.commons.net.util.NetConstants;
  *      // success.
  *      reply = ftp.getReplyCode();
  *
- *      if(!FTPReply.isPositiveCompletion(reply)) {
+ *      if (!FTPReply.isPositiveCompletion(reply)) {
  *        ftp.disconnect();
  *        System.err.println("FTP server refused connection.");
  *        System.exit(1);
@@ -96,7 +96,7 @@ import org.apache.commons.net.util.NetConstants;
  *      error = true;
  *      e.printStackTrace();
  *    } finally {
- *      if(ftp.isConnected()) {
+ *      if (ftp.isConnected()) {
  *        try {
  *          ftp.disconnect();
  *        } catch (IOException ioe) {
@@ -1164,7 +1164,7 @@ public class FTPClient extends FTP implements 
Configurable {
      * OutputStream output;
      * input  = new FileInputStream("foobaz.txt");
      * output = ftp.storeFileStream("foobar.txt")
-     * if(!FTPReply.isPositiveIntermediate(ftp.getReplyCode())) {
+     * if (!FTPReply.isPositiveIntermediate(ftp.getReplyCode())) {
      *     input.close();
      *     output.close();
      *     ftp.logout();
@@ -1176,7 +1176,7 @@ public class FTPClient extends FTP implements 
Configurable {
      * input.close();
      * output.close();
      * // Must call completePendingCommand() to finish command.
-     * if(!ftp.completePendingCommand()) {
+     * if (!ftp.completePendingCommand()) {
      *     ftp.logout();
      *     ftp.disconnect();
      *     System.err.println("File transfer failed.");
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 3fb05f19..b1541af3 100644
--- a/src/main/java/org/apache/commons/net/smtp/SMTPClient.java
+++ b/src/main/java/org/apache/commons/net/smtp/SMTPClient.java
@@ -40,7 +40,7 @@ import org.apache.commons.net.io.DotTerminatedMessageWriter;
  *      // success.
  *      reply = client.getReplyCode();
  *
- *      if(!SMTPReply.isPositiveCompletion(reply)) {
+ *      if (!SMTPReply.isPositiveCompletion(reply)) {
  *        client.disconnect();
  *        System.err.println("SMTP server refused connection.");
  *        System.exit(1);
@@ -49,7 +49,7 @@ import org.apache.commons.net.io.DotTerminatedMessageWriter;
  *      // Do useful stuff here.
  *      ...
  *    } catch (IOException e) {
- *      if(client.isConnected()) {
+ *      if (client.isConnected()) {
  *        try {
  *          client.disconnect();
  *        } catch (IOException f) {
diff --git a/src/main/java/org/apache/commons/net/smtp/SimpleSMTPHeader.java 
b/src/main/java/org/apache/commons/net/smtp/SimpleSMTPHeader.java
index b5b79fe5..f86b926d 100644
--- a/src/main/java/org/apache/commons/net/smtp/SimpleSMTPHeader.java
+++ b/src/main/java/org/apache/commons/net/smtp/SimpleSMTPHeader.java
@@ -30,7 +30,7 @@ import java.util.Locale;
  *
  * <pre>
  * writer = client.sendMessageData();
- * if(writer == null) // failure
+ * if (writer == null) // failure
  *   return false;
  * header =
  *    new SimpleSMTPHeader("foo...@foo.com", "f...@bar.com" "Just testing");
@@ -39,7 +39,7 @@ import java.util.Locale;
  * writer.write(header.toString());
  * writer.write("This is just a test");
  * writer.close();
- * if(!client.completePendingCommand()) // failure
+ * if (!client.completePendingCommand()) // failure
  *   return false;
  * </pre>
  *
diff --git a/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java 
b/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java
index 3daa56dd..3f119cd0 100644
--- a/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java
+++ b/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java
@@ -664,7 +664,7 @@ public class TelnetClientTest extends TestCase implements 
TelnetNotificationHand
             read_ok = true;
         }
 
-        // if(is1.available() == 6)
+        // if (is1.available() == 6)
         // {
         int read = 0;
         int pos = 0;
@@ -695,7 +695,7 @@ public class TelnetClientTest extends TestCase implements 
TelnetNotificationHand
             System.arraycopy(tmp, 0, buffread1, pos, read);
             pos += read;
         }
-        // if(is2.available() == 6)
+        // if (is2.available() == 6)
         // {
         is2.read(buffread1);
 

Reply via email to