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 28707ac3563261f2cbf21da03e99d014c02e6776
Author: Gary Gregory <[email protected]>
AuthorDate: Sat May 11 17:52:46 2024 -0400

    Java convention for variable declarations
---
 src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java 
b/src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java
index 29aa780a..302011f0 100644
--- a/src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java
+++ b/src/main/java/org/apache/commons/net/examples/ftp/TFTPExample.java
@@ -197,9 +197,7 @@ public final class TFTPExample {
 
     private static boolean send(final int transferMode, final String hostname, 
final String localFilename, final String remoteFilename, final TFTPClient tftp)
             throws IOException {
-        final boolean closed;
         FileInputStream input;
-
         // Try to open local file for reading
         try {
             input = new FileInputStream(localFilename);
@@ -207,9 +205,8 @@ public final class TFTPExample {
             tftp.close();
             throw new IOException("Error: could not open local file for 
reading.", e);
         }
-
         open(tftp);
-
+        final boolean closed;
         // Try to send local file via TFTP
         try {
             final String[] parts = hostname.split(":");
@@ -230,7 +227,6 @@ public final class TFTPExample {
             // Close local socket and input file
             closed = close(tftp, input);
         }
-
         return closed;
     }
 

Reply via email to