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 3b8bd8199fc5a57e056d0ad7acc1974daca042f7 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat May 4 10:55:35 2024 -0400 Reduce indentation Remove trailing whitespace --- .../commons/net/ftp/FTPClientTransferModeTest.java | 4 ++-- .../org/apache/commons/net/tftp/TFTPServerPathTest.java | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/test/java/org/apache/commons/net/ftp/FTPClientTransferModeTest.java b/src/test/java/org/apache/commons/net/ftp/FTPClientTransferModeTest.java index da643740..0bcd58bf 100644 --- a/src/test/java/org/apache/commons/net/ftp/FTPClientTransferModeTest.java +++ b/src/test/java/org/apache/commons/net/ftp/FTPClientTransferModeTest.java @@ -67,7 +67,7 @@ public class FTPClientTransferModeTest { } private static final String DEFAULT_HOME = "ftp_root/"; - + private static UserManager initUserManager(final String username, final String password) throws FtpException { final PropertiesUserManagerFactory propertiesUserManagerFactory = new PropertiesUserManagerFactory(); @@ -138,7 +138,7 @@ public class FTPClientTransferModeTest { runWithFTPserver((port, user, password) -> { final FTPClient client = new FTPClient(); - try { + try { client.connect("localhost", port); client.login(user, password); assertTrue(client.setFileTransferMode(transferMode)); diff --git a/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java b/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java index 27273d71..b49f9456 100644 --- a/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java +++ b/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java @@ -58,17 +58,16 @@ public class TFTPServerPathTest { try { Files.deleteIfExists(path); } catch (final IOException e) { - if (retry) { - System.err.println("Retrying delete failure: " + e); - try { - Thread.sleep(500); - } catch (final InterruptedException e1) { - fail(e); - } - Files.deleteIfExists(path); - } else { + if (!retry) { throw e; } + System.err.println("Retrying delete failure: " + e); + try { + Thread.sleep(500); + } catch (final InterruptedException e1) { + fail(e); + } + Files.deleteIfExists(path); } } }