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 0d7a6a43bba0eff57a94d8b74b024c4947709479 Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Wed Feb 12 11:20:03 2025 -0500 Fix Javadoc warnings --- .../commons/net/DefaultDatagramSocketFactory.java | 7 +++++++ .../commons/net/daytime/DaytimeUDPClient.java | 7 +++++++ .../org/apache/commons/net/echo/EchoUDPClient.java | 7 +++++++ .../java/org/apache/commons/net/examples/Main.java | 7 +++++++ .../commons/net/examples/PrintCommandListeners.java | 18 +++++++++--------- .../java/org/apache/commons/net/ftp/FTPClient.java | 21 +++++++++++++++++++++ .../apache/commons/net/ftp/FTPListParseEngine.java | 12 +++++++++++- .../org/apache/commons/net/ftp/FTPSCommand.java | 7 +++++++ .../apache/commons/net/ftp/FTPSSocketFactory.java | 11 ++++++++--- .../apache/commons/net/ftp/FTPSTrustManager.java | 8 ++++++++ .../parser/DefaultFTPFileEntryParserFactory.java | 7 +++++++ .../commons/net/ftp/parser/MLSxEntryParser.java | 13 +++++++++++++ src/main/java/org/apache/commons/net/imap/IMAP.java | 10 ++++++++++ .../org/apache/commons/net/imap/IMAPClient.java | 7 +++++++ .../org/apache/commons/net/imap/IMAPCommand.java | 3 +++ .../org/apache/commons/net/nntp/ArticlePointer.java | 8 ++++++++ .../org/apache/commons/net/nntp/NNTPClient.java | 7 +++++++ .../org/apache/commons/net/nntp/NewsgroupInfo.java | 7 +++++++ .../java/org/apache/commons/net/nntp/Threader.java | 7 +++++++ .../org/apache/commons/net/ntp/NTPUDPClient.java | 7 +++++++ .../org/apache/commons/net/pop3/POP3Client.java | 7 +++++++ .../java/org/apache/commons/net/telnet/Telnet.java | 8 ++++---- .../org/apache/commons/net/time/TimeUDPClient.java | 8 +++++++- .../commons/net/SocketClientFunctionalTest.java | 4 ++-- .../org/apache/commons/net/ftp/FTPClientTest.java | 4 ++-- .../net/ftp/parser/AbstractFTPParseTest.java | 4 ++-- .../DefaultFTPFileEntryParserFactoryTest.java | 4 ++-- .../net/ftp/parser/FTPConfigEntryParserTest.java | 4 ++-- .../java/org/apache/commons/net/tftp/TFTPTest.java | 4 ++-- 29 files changed, 198 insertions(+), 30 deletions(-) diff --git a/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java b/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java index 27191c00..de0df37f 100644 --- a/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java +++ b/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java @@ -32,6 +32,13 @@ import java.net.SocketException; public class DefaultDatagramSocketFactory implements DatagramSocketFactory { + /** + * Constructs a new instance. + */ + public DefaultDatagramSocketFactory() { + // empty + } + /** * Creates a DatagramSocket on the local host at the first available port. * diff --git a/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java b/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java index 61a31799..28b5fcb3 100644 --- a/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java +++ b/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java @@ -46,6 +46,13 @@ public final class DaytimeUDPClient extends DatagramSocketClient { */ private final byte[] timeData = new byte[256]; + /** + * Constructs a new instance. + */ + public DaytimeUDPClient() { + // empty + } + /** * Shorthand for {@code getTime(host, DaytimeUDPClient.DEFAULT_PORT);} * diff --git a/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java b/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java index c81bf1b0..c3baf0de 100644 --- a/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java +++ b/src/main/java/org/apache/commons/net/echo/EchoUDPClient.java @@ -39,6 +39,13 @@ public final class EchoUDPClient extends DiscardUDPClient { private final DatagramPacket receivePacket = new DatagramPacket(NetConstants.EMPTY_BTYE_ARRAY, 0); + /** + * Constructs a new instance. + */ + public EchoUDPClient() { + // empty + } + /** * Same as {@code receive(data, data.length)} * diff --git a/src/main/java/org/apache/commons/net/examples/Main.java b/src/main/java/org/apache/commons/net/examples/Main.java index 1a9b47c4..68f16c29 100644 --- a/src/main/java/org/apache/commons/net/examples/Main.java +++ b/src/main/java/org/apache/commons/net/examples/Main.java @@ -100,4 +100,11 @@ public class Main { System.out.println(e); } } + + /** + * Constructs a new instance. + */ + public Main() { + // empty + } } diff --git a/src/main/java/org/apache/commons/net/examples/PrintCommandListeners.java b/src/main/java/org/apache/commons/net/examples/PrintCommandListeners.java index 33ee5d8e..021f571f 100644 --- a/src/main/java/org/apache/commons/net/examples/PrintCommandListeners.java +++ b/src/main/java/org/apache/commons/net/examples/PrintCommandListeners.java @@ -26,22 +26,22 @@ import org.apache.commons.net.io.Util; public class PrintCommandListeners { /** - * Constructs a new instance. + * Creates a new PrintCommandListener on system out. * - * @deprecated Will be private in the next major release. + * @return a new PrintCommandListener on system out. */ - @Deprecated - public PrintCommandListeners() { - // empty + public static PrintCommandListener sysOutPrintCommandListener() { + return new PrintCommandListener(Util.newPrintWriter(System.out), true); } /** - * Creates a new PrintCommandListener on system out. + * Constructs a new instance. * - * @return a new PrintCommandListener on system out. + * @deprecated Will be private in the next major release. */ - public static PrintCommandListener sysOutPrintCommandListener() { - return new PrintCommandListener(Util.newPrintWriter(System.out), true); + @Deprecated + public PrintCommandListeners() { + // empty } } 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 2a0d6ba0..78c4796e 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java @@ -330,6 +330,14 @@ public class FTPClient extends FTP implements Configurable { * @since 3.6 */ public interface HostnameResolver { + + /** + * Resolves a host name. + * + * @param hostname the hostname to resolve. + * @return The resolved hostname. + * @throws UnknownHostException if the host is unknown. + */ String resolve(String hostname) throws UnknownHostException; } @@ -341,6 +349,11 @@ public class FTPClient extends FTP implements Configurable { public static class NatServerResolverImpl implements HostnameResolver { private final FTPClient client; + /** + * Constructs a new instance. + * + * @param client the FTP client. + */ public NatServerResolverImpl(final FTPClient client) { this.client = client; } @@ -802,6 +815,12 @@ public class FTPClient extends FTP implements Configurable { return socket; } + /** + * Parses a reply. + * + * @param reply the reply to parse. + * @throws MalformedServerReplyException if the reply is malformed. + */ protected void _parseExtendedPassiveModeReply(String reply) throws MalformedServerReplyException { reply = reply.substring(reply.indexOf('(') + 1, reply.indexOf(')')).trim(); final char delim1 = reply.charAt(0); @@ -823,6 +842,8 @@ public class FTPClient extends FTP implements Configurable { } /** + * Parses a reply. + * * @since 3.1 * @param reply the reply to parse * @throws MalformedServerReplyException if the server reply does not match (n,n,n,n),(n),(n) diff --git a/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java b/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java index 020b8389..95041e3f 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java @@ -32,21 +32,25 @@ import org.apache.commons.net.util.Charsets; * This class handles the entire process of parsing a listing of file entries from the server. * <p> * This object defines a two-part parsing mechanism. + * </p> * <p> * The first part consists of reading the raw input into an internal list of strings. Every item in this list corresponds to an actual file. All extraneous * matter emitted by the server will have been removed by the end of this phase. This is accomplished in conjunction with the FTPFileEntryParser associated with * this engine, by calling its methods {@code readNextEntry()} - which handles the issue of what delimits one entry from another, usually but not always a line * feed and {@code preParse()} - which handles removal of extraneous matter such as the preliminary lines of a listing, removal of duplicates on versioning * systems, etc. + * </p> * <p> * The second part is composed of the actual parsing, again in conjunction with the particular parser used by this engine. This is controlled by an iterator * over the internal list of strings. This may be done either in block mode, by calling the {@code getNext()} and {@code getPrevious()} methods to provide * "paged" output of less than the whole list at one time, or by calling the {@code getFiles()} method to return the entire list. + * </p> * <p> * Examples: + * </p> * <p> * Paged access: - * + * </p> * <pre> * FTPClient f = FTPClient(); * f.connect(server); @@ -61,6 +65,7 @@ import org.apache.commons.net.util.Charsets; * </pre> * <p> * For unpaged access, simply use FTPClient.listFiles(). That method uses this class transparently. + * </p> */ public class FTPListParseEngine { /** @@ -75,6 +80,11 @@ public class FTPListParseEngine { // Should invalid files (parse failures) be allowed? private final boolean saveUnparseableEntries; + /** + * Constructs a new instance. + * + * @param parser How to parse file entries. + */ public FTPListParseEngine(final FTPFileEntryParser parser) { this(parser, null); } diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java b/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java index 162376a9..22f68506 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java @@ -90,4 +90,11 @@ public final class FTPSCommand { public static String getCommand(final int command) { return commands[command]; } + + /** + * Constructs a new instance. + */ + public FTPSCommand() { + // empty + } } diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java b/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java index 4733fc16..72d8ed41 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java @@ -35,6 +35,11 @@ public class FTPSSocketFactory extends SocketFactory { private final SSLContext context; + /** + * Constructs a new instance. + * + * @param context The SSL context. + */ public FTPSSocketFactory(final SSLContext context) { this.context = context; } @@ -43,7 +48,7 @@ public class FTPSSocketFactory extends SocketFactory { * @param port the port * @return the socket * @throws IOException on error - * @deprecated (2.2) use {@link FTPSServerSocketFactory#createServerSocket(int) instead} + * @deprecated (2.2) use {@link FTPSServerSocketFactory#createServerSocket(int)}. */ @Deprecated public java.net.ServerSocket createServerSocket(final int port) throws IOException { @@ -55,7 +60,7 @@ public class FTPSSocketFactory extends SocketFactory { * @param backlog the backlog * @return the socket * @throws IOException on error - * @deprecated (2.2) use {@link FTPSServerSocketFactory#createServerSocket(int, int) instead} + * @deprecated (2.2) use {@link FTPSServerSocketFactory#createServerSocket(int, int)}. */ @Deprecated public java.net.ServerSocket createServerSocket(final int port, final int backlog) throws IOException { @@ -68,7 +73,7 @@ public class FTPSSocketFactory extends SocketFactory { * @param ifAddress the interface * @return the socket * @throws IOException on error - * @deprecated (2.2) use {@link FTPSServerSocketFactory#createServerSocket(int, int, InetAddress) instead} + * @deprecated (2.2) use {@link FTPSServerSocketFactory#createServerSocket(int, int, InetAddress)}. */ @Deprecated public java.net.ServerSocket createServerSocket(final int port, final int backlog, final InetAddress ifAddress) throws IOException { diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSTrustManager.java b/src/main/java/org/apache/commons/net/ftp/FTPSTrustManager.java index d9797c94..cde1448b 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPSTrustManager.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPSTrustManager.java @@ -33,6 +33,14 @@ import org.apache.commons.net.util.NetConstants; */ @Deprecated public class FTPSTrustManager implements X509TrustManager { + + /** + * Constructs a new instance. + */ + public FTPSTrustManager() { + // empty + } + /** * No-op */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java b/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java index 4deb840b..fda98ec2 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java @@ -39,6 +39,13 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto // Create the pattern, as it will be reused many times private static final Pattern JAVA_QUALIFIED_NAME_PATTERN = Pattern.compile(JAVA_QUALIFIED_NAME); + /** + * Constructs a new instance. + */ + public DefaultFTPFileEntryParserFactory() { + // empty + } + /** * <p> * Implementation extracts a key from the supplied {@link FTPClientConfig FTPClientConfig} parameter and creates an object implementing the interface diff --git a/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java index 8107bac9..269fa02d 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java @@ -79,10 +79,23 @@ public class MLSxEntryParser extends FTPFileEntryParserImpl { /* 5 */ { FTPFile.READ_PERMISSION, FTPFile.EXECUTE_PERMISSION }, /* 6 */ { FTPFile.READ_PERMISSION, FTPFile.WRITE_PERMISSION }, /* 7 */ { FTPFile.READ_PERMISSION, FTPFile.WRITE_PERMISSION, FTPFile.EXECUTE_PERMISSION }, }; + /** + * Gets the singleton instance. + * + * @return the singleton instance. + */ public static MLSxEntryParser getInstance() { return INSTANCE; } + /** + * Parses a line of an FTP server file listing and converts it into a usable format in the form of an {@code FTPFile} instance. If the file listing + * line doesn't describe a file, {@code null} should be returned, otherwise a {@code FTPFile} instance representing the files in the directory + * is returned. + * + * @param entry A line of text from the file listing + * @return An FTPFile instance corresponding to the supplied entry + */ public static FTPFile parseEntry(final String entry) { return INSTANCE.parseFTPEntry(entry); } diff --git a/src/main/java/org/apache/commons/net/imap/IMAP.java b/src/main/java/org/apache/commons/net/imap/IMAP.java index 02a5ed3f..3a426150 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAP.java +++ b/src/main/java/org/apache/commons/net/imap/IMAP.java @@ -49,6 +49,9 @@ public class IMAP extends SocketClient { boolean chunkReceived(IMAP imap); } + /** + * Enumerates IMAP states. + */ public enum IMAPState { /** A constant representing the state where the client is not yet connected to a server. */ DISCONNECTED_STATE, @@ -114,8 +117,15 @@ public class IMAP extends SocketClient { } private IMAPState state; + + /** + * Buffered writer. + */ protected BufferedWriter __writer; + /** + * Buffered reader. + */ protected BufferedReader _reader; private int replyCode; diff --git a/src/main/java/org/apache/commons/net/imap/IMAPClient.java b/src/main/java/org/apache/commons/net/imap/IMAPClient.java index efab52f2..a1ede494 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAPClient.java +++ b/src/main/java/org/apache/commons/net/imap/IMAPClient.java @@ -192,6 +192,13 @@ public class IMAPClient extends IMAP { // STARTTLS skipped - see IMAPSClient. // AUTHENTICATE skipped - see AuthenticatingIMAPClient. + /** + * Constructs a new instance. + */ + public IMAPClient() { + // empty + } + /** * Send an APPEND command to the server. * diff --git a/src/main/java/org/apache/commons/net/imap/IMAPCommand.java b/src/main/java/org/apache/commons/net/imap/IMAPCommand.java index 0794812d..95882849 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAPCommand.java +++ b/src/main/java/org/apache/commons/net/imap/IMAPCommand.java @@ -56,6 +56,9 @@ public enum IMAPCommand { */ LOGIN(2), + /** + * Authenticate an IMAP connection using OAuth. + */ XOAUTH(1), // commands valid in authenticated state diff --git a/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java b/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java index ccd4a4a9..fd604619 100644 --- a/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java +++ b/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java @@ -33,4 +33,12 @@ public final class ArticlePointer { * by all NNTP commands taking an article id as an argument. */ public String articleId; + + /** + * Constructs a new instance. + */ + public ArticlePointer() { + // empty + } + } diff --git a/src/main/java/org/apache/commons/net/nntp/NNTPClient.java b/src/main/java/org/apache/commons/net/nntp/NNTPClient.java index 7273f331..87c8f42e 100644 --- a/src/main/java/org/apache/commons/net/nntp/NNTPClient.java +++ b/src/main/java/org/apache/commons/net/nntp/NNTPClient.java @@ -171,6 +171,13 @@ public class NNTPClient extends NNTP { return result; } + /** + * Constructs a new instance. + */ + public NNTPClient() { + // empty + } + @SuppressWarnings("deprecation") private void ai2ap(final ArticleInfo ai, final ArticlePointer ap) { if (ap != null) { // ai cannot be null diff --git a/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java b/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java index 2d6271c3..db6cb386 100644 --- a/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java +++ b/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java @@ -49,6 +49,13 @@ public final class NewsgroupInfo { private long lastArticle; private int postingPermission; + /** + * Constructs a new instance. + */ + public NewsgroupInfo() { + // empty + } + /** * Gets the estimated number of articles in the newsgroup. The accuracy of this value will depend on the server implementation. * diff --git a/src/main/java/org/apache/commons/net/nntp/Threader.java b/src/main/java/org/apache/commons/net/nntp/Threader.java index 06653d13..2ed17d14 100644 --- a/src/main/java/org/apache/commons/net/nntp/Threader.java +++ b/src/main/java/org/apache/commons/net/nntp/Threader.java @@ -31,6 +31,13 @@ import java.util.Map; */ public class Threader { + /** + * Constructs a new instance. + */ + public Threader() { + // empty + } + /** * * @param threadable diff --git a/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java b/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java index 30c9e783..e15f57a8 100644 --- a/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java +++ b/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java @@ -36,6 +36,13 @@ public final class NTPUDPClient extends DatagramSocketClient { private int version = NtpV3Packet.VERSION_3; + /** + * Constructs a new instance. + */ + public NTPUDPClient() { + // empty + } + /** * Retrieves the time information from the specified server on the default NTP port and returns it. The time is the number of milliseconds since 00:00 * (midnight) 1 January 1900 UTC, as specified by RFC 1305. This method reads the raw NTP packet and constructs a <em>TimeInfo</em> object that allows diff --git a/src/main/java/org/apache/commons/net/pop3/POP3Client.java b/src/main/java/org/apache/commons/net/pop3/POP3Client.java index fc19e933..cf6ad24a 100644 --- a/src/main/java/org/apache/commons/net/pop3/POP3Client.java +++ b/src/main/java/org/apache/commons/net/pop3/POP3Client.java @@ -99,6 +99,13 @@ public class POP3Client extends POP3 { return new POP3MessageInfo(num, line); } + /** + * Constructs a new instance. + */ + public POP3Client() { + // empty + } + /** * Send a CAPA command to the POP3 server. * diff --git a/src/main/java/org/apache/commons/net/telnet/Telnet.java b/src/main/java/org/apache/commons/net/telnet/Telnet.java index b02ad436..ac77eea2 100644 --- a/src/main/java/org/apache/commons/net/telnet/Telnet.java +++ b/src/main/java/org/apache/commons/net/telnet/Telnet.java @@ -76,20 +76,22 @@ class Telnet extends SocketClient { */ static final byte[] COMMAND_AYT = { (byte) TelnetCommand.IAC, (byte) TelnetCommand.AYT }; + static final char NUL = '\0'; + private final int[] doResponse; private final int[] willResponse; private final int[] options; + /* open TelnetOptionHandler functionality (end) */ + /** * Terminal type */ private String terminalType; /* TERMINAL-TYPE option (end) */ - /* open TelnetOptionHandler functionality (end) */ - /* open TelnetOptionHandler functionality (start) */ /** * Array of option handlers @@ -117,8 +119,6 @@ class Telnet extends SocketClient { */ private TelnetNotificationHandler notifhand; - static final char NUL = '\0'; - /** * Empty Constructor */ diff --git a/src/main/java/org/apache/commons/net/time/TimeUDPClient.java b/src/main/java/org/apache/commons/net/time/TimeUDPClient.java index c75fd1d2..cd5788ca 100644 --- a/src/main/java/org/apache/commons/net/time/TimeUDPClient.java +++ b/src/main/java/org/apache/commons/net/time/TimeUDPClient.java @@ -34,7 +34,6 @@ import org.apache.commons.net.DatagramSocketClient; * * @see TimeTCPClient */ - public final class TimeUDPClient extends DatagramSocketClient { /** The default time port. It is set to 37 according to RFC 868. */ @@ -54,6 +53,13 @@ public final class TimeUDPClient extends DatagramSocketClient { return time; } + /** + * Constructs a new instance. + */ + public TimeUDPClient() { + // empty + } + /** * Same as {@code getTime(host, DEFAULT_PORT);} * diff --git a/src/test/java/org/apache/commons/net/SocketClientFunctionalTest.java b/src/test/java/org/apache/commons/net/SocketClientFunctionalTest.java index 0e7ced13..1030eaa3 100644 --- a/src/test/java/org/apache/commons/net/SocketClientFunctionalTest.java +++ b/src/test/java/org/apache/commons/net/SocketClientFunctionalTest.java @@ -19,10 +19,10 @@ package org.apache.commons.net; import java.net.InetSocketAddress; import java.net.Proxy; -import junit.framework.TestCase; - import org.apache.commons.net.ftp.FTPClient; +import junit.framework.TestCase; + /** * A simple functional test class for SocketClients. * diff --git a/src/test/java/org/apache/commons/net/ftp/FTPClientTest.java b/src/test/java/org/apache/commons/net/ftp/FTPClientTest.java index f796aa46..74217f1a 100644 --- a/src/test/java/org/apache/commons/net/ftp/FTPClientTest.java +++ b/src/test/java/org/apache/commons/net/ftp/FTPClientTest.java @@ -22,10 +22,10 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.InetAddress; -import junit.framework.TestCase; - import org.apache.commons.net.ftp.parser.UnixFTPEntryParser; +import junit.framework.TestCase; + public class FTPClientTest extends TestCase { private static final class LocalClient extends FTPClient { diff --git a/src/test/java/org/apache/commons/net/ftp/parser/AbstractFTPParseTest.java b/src/test/java/org/apache/commons/net/ftp/parser/AbstractFTPParseTest.java index 920583a3..0975ed89 100644 --- a/src/test/java/org/apache/commons/net/ftp/parser/AbstractFTPParseTest.java +++ b/src/test/java/org/apache/commons/net/ftp/parser/AbstractFTPParseTest.java @@ -21,11 +21,11 @@ import java.time.Instant; import java.util.Calendar; import java.util.Locale; -import junit.framework.TestCase; - import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.FTPFileEntryParser; +import junit.framework.TestCase; + /** */ public abstract class AbstractFTPParseTest extends TestCase { diff --git a/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java b/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java index 18ad60c8..0329fbaf 100644 --- a/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java +++ b/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java @@ -19,11 +19,11 @@ package org.apache.commons.net.ftp.parser; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertThrows; -import junit.framework.TestCase; - import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPFileEntryParser; +import junit.framework.TestCase; + public class DefaultFTPFileEntryParserFactoryTest extends TestCase { private void checkParserClass(final FTPFileEntryParserFactory fact, final String key, final Class<?> expected) { final FTPClientConfig config = key == null ? new FTPClientConfig() : new FTPClientConfig(key); diff --git a/src/test/java/org/apache/commons/net/ftp/parser/FTPConfigEntryParserTest.java b/src/test/java/org/apache/commons/net/ftp/parser/FTPConfigEntryParserTest.java index db6f0c54..afebc3d2 100644 --- a/src/test/java/org/apache/commons/net/ftp/parser/FTPConfigEntryParserTest.java +++ b/src/test/java/org/apache/commons/net/ftp/parser/FTPConfigEntryParserTest.java @@ -19,11 +19,11 @@ package org.apache.commons.net.ftp.parser; import java.text.SimpleDateFormat; import java.util.Calendar; -import junit.framework.TestCase; - import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPFile; +import junit.framework.TestCase; + /** * This is a simple TestCase that tests entry parsing using the new FTPClientConfig mechanism. The normal FTPClient cannot handle the different date formats in * these entries, however using a configurable format, we can handle it easily. diff --git a/src/test/java/org/apache/commons/net/tftp/TFTPTest.java b/src/test/java/org/apache/commons/net/tftp/TFTPTest.java index 16f3513a..84373118 100644 --- a/src/test/java/org/apache/commons/net/tftp/TFTPTest.java +++ b/src/test/java/org/apache/commons/net/tftp/TFTPTest.java @@ -26,11 +26,11 @@ import java.io.IOException; import java.io.OutputStream; import java.net.InetAddress; -import junit.framework.TestCase; - import org.apache.commons.io.FileUtils; import org.apache.commons.net.tftp.TFTPServer.ServerMode; +import junit.framework.TestCase; + /** * Test the TFTP Server and TFTP Client by creating some FILES in the system temp folder and then uploading and downloading them. */