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 f621a0a7 Javadoc: Use semantic tag <strong> instead of style tag <b> f621a0a7 is described below commit f621a0a769fe05eabac0c2c6e0cd71e8d8cab24d Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 15 11:39:42 2024 -0500 Javadoc: Use semantic tag <strong> instead of style tag <b> - Adjust '{'s --- .../apache/commons/net/examples/package-info.java | 2 +- src/main/java/org/apache/commons/net/ftp/FTP.java | 2 +- .../java/org/apache/commons/net/ftp/FTPClient.java | 164 ++++++++++----------- .../apache/commons/net/ftp/FTPListParseEngine.java | 62 ++++---- .../org/apache/commons/net/ftp/FTPSClient.java | 3 +- .../parser/DefaultFTPFileEntryParserFactory.java | 6 +- .../ftp/parser/EnterpriseUnixFTPEntryParser.java | 2 +- .../net/ftp/parser/NetwareFTPEntryParser.java | 16 +- .../org/apache/commons/net/imap/IMAPSClient.java | 2 +- .../org/apache/commons/net/smtp/RelayPath.java | 2 +- .../org/apache/commons/net/smtp/SMTPReply.java | 2 +- .../commons/net/daytime/MockDaytimeTCPServer.java | 2 +- 12 files changed, 133 insertions(+), 132 deletions(-) diff --git a/src/main/java/org/apache/commons/net/examples/package-info.java b/src/main/java/org/apache/commons/net/examples/package-info.java index 520014c2..e28774cb 100644 --- a/src/main/java/org/apache/commons/net/examples/package-info.java +++ b/src/main/java/org/apache/commons/net/examples/package-info.java @@ -18,6 +18,6 @@ /** * Example classes. * <p> - * <b>These do not form part of the public API and may change without notice.</b> + * <strong>These do not form part of the public API and may change without notice.</strong> */ package org.apache.commons.net.examples; \ No newline at end of file diff --git a/src/main/java/org/apache/commons/net/ftp/FTP.java b/src/main/java/org/apache/commons/net/ftp/FTP.java index 2d152d78..65d6aca2 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTP.java +++ b/src/main/java/org/apache/commons/net/ftp/FTP.java @@ -1275,7 +1275,7 @@ public class FTP extends SocketClient { * If true, it requires the 3-digit code be followed by space and some text. <br> * If false, only the 3-digit code is required (as was the case for versions up to 3.5) * <p> - * <b>This should not be required by a well-behaved FTP server</b> <br> + * <strong>This should not be required by a well-behaved FTP server</strong> <br> * * @param strictReplyParsing the setting * @since 3.6 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 ea51538f..78c14ceb 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java @@ -115,16 +115,16 @@ import org.apache.commons.net.util.NetConstants; * FTP reply code causing a success or failure, you must call {@link org.apache.commons.net.ftp.FTP#getReplyCode getReplyCode } after a success or failure. * </p> * <p> - * The default settings for FTPClient are for it to use {@code FTP.ASCII_FILE_TYPE}, {@code FTP.NON_PRINT_TEXT_FORMAT}, - * {@code FTP.STREAM_TRANSFER_MODE}, and {@code FTP.FILE_STRUCTURE}. The only file types directly supported are {@code FTP.ASCII_FILE_TYPE} - * and {@code FTP.BINARY_FILE_TYPE}. Because there are at least 4 different EBCDIC encodings, we have opted not to provide direct support for EBCDIC. To - * transfer EBCDIC and other unsupported file types you must create your own filter InputStreams and OutputStreams and wrap them around the streams returned or - * required by the FTPClient methods. FTPClient uses the {@link ToNetASCIIOutputStream NetASCII} filter streams to provide transparent handling of ASCII files. - * We will consider incorporating EBCDIC support if there is enough demand. + * The default settings for FTPClient are for it to use {@code FTP.ASCII_FILE_TYPE}, {@code FTP.NON_PRINT_TEXT_FORMAT}, {@code FTP.STREAM_TRANSFER_MODE}, and + * {@code FTP.FILE_STRUCTURE}. The only file types directly supported are {@code FTP.ASCII_FILE_TYPE} and {@code FTP.BINARY_FILE_TYPE}. Because there are at + * least 4 different EBCDIC encodings, we have opted not to provide direct support for EBCDIC. To transfer EBCDIC and other unsupported file types you must + * create your own filter InputStreams and OutputStreams and wrap them around the streams returned or required by the FTPClient methods. FTPClient uses the + * {@link ToNetASCIIOutputStream NetASCII} filter streams to provide transparent handling of ASCII files. We will consider incorporating EBCDIC support if there + * is enough demand. * </p> * <p> - * {@code FTP.NON_PRINT_TEXT_FORMAT}, {@code FTP.STREAM_TRANSFER_MODE}, and {@code FTP.FILE_STRUCTURE} are the only supported formats, - * transfer modes, and file structures. + * {@code FTP.NON_PRINT_TEXT_FORMAT}, {@code FTP.STREAM_TRANSFER_MODE}, and {@code FTP.FILE_STRUCTURE} are the only supported formats, transfer modes, and file + * structures. * </p> * <p> * Because the handling of sockets on different platforms can differ significantly, the FTPClient automatically issues a new PORT (or EPRT) command prior to @@ -141,12 +141,12 @@ import org.apache.commons.net.util.NetConstants; * (usually 900 seconds). The FTPClient class will detect a premature FTP server connection closing when it receives a * {@link org.apache.commons.net.ftp.FTPReply#SERVICE_NOT_AVAILABLE FTPReply.SERVICE_NOT_AVAILABLE } response to a command. When that occurs, the FTP class * method encountering that reply will throw an {@link org.apache.commons.net.ftp.FTPConnectionClosedException} . {@code FTPConnectionClosedException} is a - * subclass of {@code IOException} and therefore need not be caught separately, but if you are going to catch it separately, its catch block must appear - * before the more general {@code IOException} catch block. When you encounter an {@link org.apache.commons.net.ftp.FTPConnectionClosedException} , you - * must disconnect the connection with {@link #disconnect disconnect() } to properly clean up the system resources used by FTPClient. Before disconnecting, you - * may check the last reply code and text with {@link org.apache.commons.net.ftp.FTP#getReplyCode getReplyCode }, - * {@link org.apache.commons.net.ftp.FTP#getReplyString getReplyString }, and {@link org.apache.commons.net.ftp.FTP#getReplyStrings getReplyStrings}. You may - * avoid server disconnections while the client is idle by periodically sending NOOP commands to the server. + * subclass of {@code IOException} and therefore need not be caught separately, but if you are going to catch it separately, its catch block must appear before + * the more general {@code IOException} catch block. When you encounter an {@link org.apache.commons.net.ftp.FTPConnectionClosedException} , you must disconnect + * the connection with {@link #disconnect disconnect() } to properly clean up the system resources used by FTPClient. Before disconnecting, you may check the + * last reply code and text with {@link org.apache.commons.net.ftp.FTP#getReplyCode getReplyCode }, {@link org.apache.commons.net.ftp.FTP#getReplyString + * getReplyString }, and {@link org.apache.commons.net.ftp.FTP#getReplyStrings getReplyStrings}. You may avoid server disconnections while the client is idle by + * periodically sending NOOP commands to the server. * </p> * <p> * Rather than list it separately for each method, we mention here that every method communicating with the server and throwing an IOException can also throw a @@ -210,10 +210,10 @@ import org.apache.commons.net.util.NetConstants; * </ul> * see {@link FTPClientConfig FTPClientConfig}. * <p> - * <b>Control channel keep-alive feature</b>: + * <strong>Control channel keep-alive feature</strong>: * </p> * <p> - * <b>Please note:</b> this does not apply to the methods where the user is responsible for writing or reading the data stream, i.e. + * <strong>Please note:</strong> this does not apply to the methods where the user is responsible for writing or reading the data stream, i.e. * {@link #retrieveFileStream(String)} , {@link #storeFileStream(String)} and the other xxxFileStream methods * </p> * <p> @@ -251,7 +251,7 @@ import org.apache.commons.net.util.NetConstants; * block transfer takes. * </p> * <p> - * <b>This keep-alive feature is optional; if it does not help or causes problems then don't use it.</b> + * <strong>This keep-alive feature is optional; if it does not help or causes problems then don't use it.</strong> * </p> * * @see #FTP_SYSTEM_TYPE @@ -589,9 +589,9 @@ public class FTPClient extends FTP implements Configurable { private boolean ipAddressFromPasvResponse = Boolean.getBoolean(FTP_IP_ADDRESS_FROM_PASV_RESPONSE); /** - * Default FTPClient constructor. Creates a new FTPClient instance with the data connection mode set to {@code ACTIVE_LOCAL_DATA_CONNECTION_MODE}, - * the file type set to {@code FTP.ASCII_FILE_TYPE}, the file format set to {@code FTP.NON_PRINT_TEXT_FORMAT}, the file structure set to - * {@code FTP.FILE_STRUCTURE}, and the transfer mode set to {@code FTP.STREAM_TRANSFER_MODE}. + * Default FTPClient constructor. Creates a new FTPClient instance with the data connection mode set to {@code ACTIVE_LOCAL_DATA_CONNECTION_MODE}, the file + * type set to {@code FTP.ASCII_FILE_TYPE}, the file format set to {@code FTP.NON_PRINT_TEXT_FORMAT}, the file structure set to {@code FTP.FILE_STRUCTURE}, + * and the transfer mode set to {@code FTP.STREAM_TRANSFER_MODE}. * <p> * The list parsing auto-detect feature can be configured to use lenient future dates (short dates may be up to one day in the future) as follows: * </p> @@ -1101,8 +1101,8 @@ public class FTPClient extends FTP implements Configurable { * do this). You must close the OutputStream when you finish writing to it. The OutputStream itself will take care of closing the parent data connection * socket upon being closed. * <p> - * <b>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify success.</b> - * If this is not done, subsequent commands may behave unexpectedly. + * <strong>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify + * success.</strong> If this is not done, subsequent commands may behave unexpectedly. * </p> * * @param remote The name of the remote file. @@ -1188,8 +1188,8 @@ public class FTPClient extends FTP implements Configurable { } /** - * Implements the {@link Configurable} interface. In the case of this class, configuring merely makes the config object available for - * the factory methods that construct parsers. + * Implements the {@link Configurable} interface. In the case of this class, configuring merely makes the config object available for the factory methods + * that construct parsers. * * @param config {@link FTPClientConfig} object used to provide non-standard configurations to the parser. * @since 1.4 @@ -1306,8 +1306,8 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the current data connection mode to {@code ACTIVE_LOCAL_DATA_CONNECTION_MODE}. No communication with the FTP server is conducted, but this - * causes all future data transfers to require the FTP server to connect to the client's data port. Additionally, to accommodate differences between socket + * Sets the current data connection mode to {@code ACTIVE_LOCAL_DATA_CONNECTION_MODE}. No communication with the FTP server is conducted, but this causes + * all future data transfers to require the FTP server to connect to the client's data port. Additionally, to accommodate differences between socket * implementations on different platforms, this method causes the client to issue a PORT command before every data transfer. */ public void enterLocalActiveMode() { @@ -1317,12 +1317,12 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the current data connection mode to {@code PASSIVE_LOCAL_DATA_CONNECTION_MODE}. Use this method only for data transfers between the client - * and server. This method causes a PASV (or EPSV) command to be issued to the server before the opening of every data connection, telling the server to - * open a data port to which the client will connect to conduct data transfers. The FTPClient will stay in {@code PASSIVE_LOCAL_DATA_CONNECTION_MODE} - * until the mode is changed by calling some other method such as {@link #enterLocalActiveMode enterLocalActiveMode() } + * Sets the current data connection mode to {@code PASSIVE_LOCAL_DATA_CONNECTION_MODE}. Use this method only for data transfers between the client and + * server. This method causes a PASV (or EPSV) command to be issued to the server before the opening of every data connection, telling the server to open a + * data port to which the client will connect to conduct data transfers. The FTPClient will stay in {@code PASSIVE_LOCAL_DATA_CONNECTION_MODE} until the + * mode is changed by calling some other method such as {@link #enterLocalActiveMode enterLocalActiveMode() } * <p> - * <b>N.B.</b> currently calling any connect method will reset the mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE. + * <strong>N.B.</strong> currently calling any connect method will reset the mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE. * </p> */ public void enterLocalPassiveMode() { @@ -1334,9 +1334,9 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the current data connection mode to {@code ACTIVE_REMOTE_DATA_CONNECTION}. Use this method only for server to server data transfers. This - * method issues a PORT command to the server, indicating the other server and port to which it should connect for data transfers. You must call this method - * before EVERY server to server transfer attempt. The FTPClient will NOT automatically continue to issue PORT commands. You also must remember to call + * Sets the current data connection mode to {@code ACTIVE_REMOTE_DATA_CONNECTION}. Use this method only for server to server data transfers. This method + * issues a PORT command to the server, indicating the other server and port to which it should connect for data transfers. You must call this method before + * EVERY server to server transfer attempt. The FTPClient will NOT automatically continue to issue PORT commands. You also must remember to call * {@link #enterLocalActiveMode enterLocalActiveMode() } if you wish to return to the normal data connection mode. * * @param host The passive mode server accepting connections for data transfers. @@ -1358,9 +1358,9 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the current data connection mode to {@code PASSIVE_REMOTE_DATA_CONNECTION_MODE}. Use this method only for server to server data transfers. - * This method issues a PASV command to the server, telling it to open a data port to which the active server will connect to conduct data transfers. You - * must call this method before EVERY server to server transfer attempt. The FTPClient will NOT automatically continue to issue PASV commands. You also must + * Sets the current data connection mode to {@code PASSIVE_REMOTE_DATA_CONNECTION_MODE}. Use this method only for server to server data transfers. This + * method issues a PASV command to the server, telling it to open a data port to which the active server will connect to conduct data transfers. You must + * call this method before EVERY server to server transfer attempt. The FTPClient will NOT automatically continue to issue PASV commands. You also must * remember to call {@link #enterLocalActiveMode enterLocalActiveMode() } if you wish to return to the normal data connection mode. * * @return True if successfully completed, false if not. @@ -1552,7 +1552,7 @@ public class FTPClient extends FTP implements Configurable { /** * Gets the CSL debug array. * <p> - * <b>For debug use only</b> + * <strong>For debug use only</strong> * </p> * <p> * Currently, it contains: @@ -1585,7 +1585,7 @@ public class FTPClient extends FTP implements Configurable { * Gets the timeout to use when reading from the data connection. This timeout will be set immediately after opening the data connection, provided that the * value is ≥ 0. * <p> - * <b>Note:</b> the timeout will also be applied when calling accept() whilst establishing an active local data connection. + * <strong>Note:</strong> the timeout will also be applied when calling accept() whilst establishing an active local data connection. * </p> * * @return The default timeout used when opening a data connection socket. The value 0 means an infinite timeout. @@ -1956,8 +1956,8 @@ public class FTPClient extends FTP implements Configurable { * </p> * * @return A FTPListParseEngine object that holds the raw information and is capable of providing parsed FTPFile objects, one for each file containing - * information contained in the given path in the format determined by the {@code parser} parameter. Null will be returned if a data - * connection cannot be opened. If the current working directory contains no files, an empty array will be the return. + * information contained in the given path in the format determined by the {@code parser} parameter. Null will be returned if a data connection + * cannot be opened. If the current working directory contains no files, an empty array will be the return. * * @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client * being idle or some other reason causing the server to send FTP reply code 421. @@ -2025,8 +2025,8 @@ public class FTPClient extends FTP implements Configurable { * @param pathname the starting directory * * @return A FTPListParseEngine object that holds the raw information and is capable of providing parsed FTPFile objects, one for each file containing - * information contained in the given path in the format determined by the {@code parser} parameter. Null will be returned if a data - * connection cannot be opened. If the current working directory contains no files, an empty array will be the return. + * information contained in the given path in the format determined by the {@code parser} parameter. Null will be returned if a data connection + * cannot be opened. If the current working directory contains no files, an empty array will be the return. * * @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client * being idle or some other reason causing the server to send FTP reply code 421. @@ -2054,15 +2054,15 @@ public class FTPClient extends FTP implements Configurable { * lists. * </p> * - * @param parserKey A string representing a designated code or fully-qualified class name of an {@code FTPFileEntryParser} that should be used to - * parse each server file listing. May be {@code null}, in which case the code checks first the system property {@link #FTP_SYSTEM_TYPE}, - * and if that is not defined the SYST command is used to provide the value. To allow for arbitrary system types, the return from the SYST - * command is used to look up an alias for the type in the {@link #SYSTEM_TYPE_PROPERTIES} properties file if it is available. + * @param parserKey A string representing a designated code or fully-qualified class name of an {@code FTPFileEntryParser} that should be used to parse each + * server file listing. May be {@code null}, in which case the code checks first the system property {@link #FTP_SYSTEM_TYPE}, and if that + * is not defined the SYST command is used to provide the value. To allow for arbitrary system types, the return from the SYST command is + * used to look up an alias for the type in the {@link #SYSTEM_TYPE_PROPERTIES} properties file if it is available. * @param pathname the starting directory * * @return A FTPListParseEngine object that holds the raw information and is capable of providing parsed FTPFile objects, one for each file containing - * information contained in the given path in the format determined by the {@code parser} parameter. Null will be returned if a data - * connection cannot be opened. If the current working directory contains no files, an empty array will be the return. + * information contained in the given path in the format determined by the {@code parser} parameter. Null will be returned if a data connection + * cannot be opened. If the current working directory contains no files, an empty array will be the return. * * @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client * being idle or some other reason causing the server to send FTP reply code 421. @@ -2225,9 +2225,9 @@ public class FTPClient extends FTP implements Configurable { * include milliseconds. See {@link #mlistDir()} * </p> * - * @return The list of file information contained in the current directory in the format determined by the autodetection mechanism. - * <b>NOTE:</b> This array may contain null members if any of the individual file listings failed to parse. The caller should check each entry for - * null before referencing it. + * @return The list of file information contained in the current directory in the format determined by the autodetection mechanism. <strong>NOTE:</strong> + * This array may contain null members if any of the individual file listings failed to parse. The caller should check each entry for null before + * referencing it. * @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client * being idle or some other reason causing the server to send FTP reply code 421. * This exception may be caught either as an IOException or independently as itself. @@ -2692,8 +2692,8 @@ public class FTPClient extends FTP implements Configurable { /** * Initiate a server to server file transfer. This method tells the server to which the client is connected to store a file on the other server using a - * unique file name. The other server must have had a {@code remoteRetrieve} issued to it by another FTPClient. Many FTP servers require that a base - * file name be given from which the unique file name can be derived. For those servers use the other version of {@code remoteStoreUnique} + * unique file name. The other server must have had a {@code remoteRetrieve} issued to it by another FTPClient. Many FTP servers require that a base file + * name be given from which the unique file name can be derived. For those servers use the other version of {@code remoteStoreUnique} * * @return True if successfully completed, false if not. * @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client being idle or some other reason @@ -2759,8 +2759,8 @@ public class FTPClient extends FTP implements Configurable { } /** - * Restart a {@code STREAM_TRANSFER_MODE} file transfer starting from the given offset. This will only work on FTP servers supporting the REST comand - * for the stream transfer mode. However, most FTP servers support this. Any subsequent file transfer will start reading or writing the remote file from the + * Restart a {@code STREAM_TRANSFER_MODE} file transfer starting from the given offset. This will only work on FTP servers supporting the REST comand for + * the stream transfer mode. However, most FTP servers support this. Any subsequent file transfer will start reading or writing the remote file from the * indicated offset. * * @param offset The offset into the remote file at which to start the next file transfer. @@ -2803,8 +2803,8 @@ public class FTPClient extends FTP implements Configurable { * separators in the file to the local representation. You must close the InputStream when you finish reading from it. The InputStream itself will take care * of closing the parent data connection socket upon being closed. * <p> - * <b>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify success.</b> - * If this is not done, subsequent commands may behave unexpectedly. + * <strong>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify + * success.</strong> If this is not done, subsequent commands may behave unexpectedly. * <p> * Note: if you have used {@link #setRestartOffset(long)}, the file data will start from the selected offset. * @@ -2959,7 +2959,7 @@ public class FTPClient extends FTP implements Configurable { * Sets the timeout to use when reading from the data connection. This timeout will be set immediately after opening the data connection, provided that the * value is ≥ 0. * <p> - * <b>Note:</b> the timeout will also be applied when calling accept() whilst establishing an active local data connection. + * <strong>Note:</strong> the timeout will also be applied when calling accept() whilst establishing an active local data connection. * </p> * * @param timeout The default timeout that is used when opening a data connection socket. The value 0 (or null) means an infinite timeout. @@ -2973,7 +2973,7 @@ public class FTPClient extends FTP implements Configurable { * Sets the timeout in milliseconds to use when reading from the data connection. This timeout will be set immediately after opening the data connection, * provided that the value is ≥ 0. * <p> - * <b>Note:</b> the timeout will also be applied when calling accept() whilst establishing an active local data connection. + * <strong>Note:</strong> the timeout will also be applied when calling accept() whilst establishing an active local data connection. * </p> * * @deprecated Use {@link #setDataTimeout(Duration)}. @@ -3003,8 +3003,7 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the transfer mode. The default transfer mode {@code FTP.STREAM_TRANSFER_MODE} if this method is never called or if a connect method is - * called. + * Sets the transfer mode. The default transfer mode {@code FTP.STREAM_TRANSFER_MODE} if this method is never called or if a connect method is called. * * @param fileTransferMode The new transfer mode to use (one of the FTP class {@code _TRANSFER_MODE} constants). * @return True if successfully completed, false if not. @@ -3022,13 +3021,13 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the file type to be transferred. This should be one of {@code FTP.ASCII_FILE_TYPE}, {@code FTP.BINARY_FILE_TYPE}, etc. The file type - * only needs to be set when you want to change the type. After changing it, the new type stays in effect until you change it again. The default file type - * is {@code FTP.ASCII_FILE_TYPE} if this method is never called. <br> + * Sets the file type to be transferred. This should be one of {@code FTP.ASCII_FILE_TYPE}, {@code FTP.BINARY_FILE_TYPE}, etc. The file type only needs to + * be set when you want to change the type. After changing it, the new type stays in effect until you change it again. The default file type is + * {@code FTP.ASCII_FILE_TYPE} if this method is never called. <br> * The server default is supposed to be ASCII (see RFC 959), however many ftp servers default to BINARY. <b>To ensure correct operation with all servers, * always specify the appropriate file type after connecting to the server.</b> <br> * <p> - * <b>N.B.</b> currently calling any connect method will reset the type to FTP.ASCII_FILE_TYPE. + * <strong>N.B.</strong> currently calling any connect method will reset the type to FTP.ASCII_FILE_TYPE. * * @param fileType The {@code _FILE_TYPE} constant indicating the type of file. * @return True if successfully completed, false if not. @@ -3047,15 +3046,16 @@ public class FTPClient extends FTP implements Configurable { } /** - * Sets the file type to be transferred and the format. The type should be one of {@code FTP.ASCII_FILE_TYPE}, {@code FTP.BINARY_FILE_TYPE}, - * etc. The file type only needs to be set when you want to change the type. After changing it, the new type stays in effect until you change it again. The - * default file type is {@code FTP.ASCII_FILE_TYPE} if this method is never called. <br> + * Sets the file type to be transferred and the format. The type should be one of {@code FTP.ASCII_FILE_TYPE}, {@code FTP.BINARY_FILE_TYPE}, etc. The file + * type only needs to be set when you want to change the type. After changing it, the new type stays in effect until you change it again. The default file + * type is {@code FTP.ASCII_FILE_TYPE} if this method is never called. <br> * The server default is supposed to be ASCII (see RFC 959), however many ftp servers default to BINARY. <b>To ensure correct operation with all servers, * always specify the appropriate file type after connecting to the server.</b> <br> - * The format should be one of the FTP class {@code TEXT_FORMAT} constants, or if the type is {@code FTP.LOCAL_FILE_TYPE}, the format should - * be the byte size for that type. The default format is {@code FTP.NON_PRINT_TEXT_FORMAT} if this method is never called. + * The format should be one of the FTP class {@code TEXT_FORMAT} constants, or if the type is {@code FTP.LOCAL_FILE_TYPE}, the format should be the byte + * size for that type. The default format is {@code FTP.NON_PRINT_TEXT_FORMAT} if this method is never called. * <p> - * <b>N.B.</b> currently calling any connect method will reset the type to FTP.ASCII_FILE_TYPE and the formatOrByteSize to FTP.NON_PRINT_TEXT_FORMAT. + * <strong>N.B.</strong> currently calling any connect method will reset the type to FTP.ASCII_FILE_TYPE and the formatOrByteSize to + * FTP.NON_PRINT_TEXT_FORMAT. * </p> * * @param fileType The {@code _FILE_TYPE} constant indicating the type of file. @@ -3080,8 +3080,8 @@ public class FTPClient extends FTP implements Configurable { * will be silently ignored, and replaced with the remote IP address of the control connection, unless this configuration option is given, which restores * the old behavior. To enable this by default, use the system property {@link FTPClient#FTP_IP_ADDRESS_FROM_PASV_RESPONSE}. * - * @param ipAddressFromPasvResponse True, if the IP address from the server's response should be used (pre-3.9.0 compatible behavior), or false (ignore - * that IP address). + * @param ipAddressFromPasvResponse True, if the IP address from the server's response should be used (pre-3.9.0 compatible behavior), or false (ignore that + * IP address). * @see FTPClient#FTP_IP_ADDRESS_FROM_PASV_RESPONSE * @see #isIpAddressFromPasvResponse * @since 3.9.0 @@ -3218,7 +3218,7 @@ public class FTPClient extends FTP implements Configurable { * marker is reset to zero after use. * </p> * <p> - * <b>Note: This method should only be invoked immediately prior to the transfer to which it applies.</b> + * <strong>Note: This method should only be invoked immediately prior to the transfer to which it applies.</strong> * </p> * * @param offset The offset into the remote file at which to start the next file transfer. This must be a value greater than or equal to zero. @@ -3288,8 +3288,8 @@ public class FTPClient extends FTP implements Configurable { * do this). You must close the OutputStream when you finish writing to it. The OutputStream itself will take care of closing the parent data connection * socket upon being closed. * <p> - * <b>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify success.</b> - * If this is not done, subsequent commands may behave unexpectedly. + * <strong>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify + * success.</strong> If this is not done, subsequent commands may behave unexpectedly. * </p> * * @param remote The name to give the remote file. @@ -3351,8 +3351,8 @@ public class FTPClient extends FTP implements Configurable { * special OutputStream to do this). You must close the OutputStream when you finish writing to it. The OutputStream itself will take care of closing the * parent data connection socket upon being closed. * <p> - * <b>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify success.</b> - * If this is not done, subsequent commands may behave unexpectedly. + * <strong>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify + * success.</strong> If this is not done, subsequent commands may behave unexpectedly. * </p> * * @return An OutputStream through which the remote file can be written. If the data connection cannot be opened (e.g., the file does not exist), null is @@ -3372,8 +3372,8 @@ public class FTPClient extends FTP implements Configurable { * special OutputStream to do this). You must close the OutputStream when you finish writing to it. The OutputStream itself will take care of closing the * parent data connection socket upon being closed. * <p> - * <b>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify success.</b> - * If this is not done, subsequent commands may behave unexpectedly. + * <strong>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify + * success.</strong> If this is not done, subsequent commands may behave unexpectedly. * * @param remote The name on which to base the unique name given to the remote file. * @return An OutputStream through which the remote file can be written. If the data connection cannot be opened (e.g., the file does not exist), null is @@ -3407,7 +3407,7 @@ public class FTPClient extends FTP implements Configurable { return new DeflateSocket(plainSocket); // Experiment, not in an RFC? // case GZIP_TRANSFER_MODE: - //return new GZIPSocket(plainSocket); + // return new GZIPSocket(plainSocket); default: return plainSocket; } 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 fca5b1bb..f6369fc6 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java @@ -35,13 +35,13 @@ import org.apache.commons.net.util.Charsets; * <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. + * 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> * 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. + * 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> * Examples: * <p> @@ -101,8 +101,8 @@ public class FTPListParseEngine { * * @return a list of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. * <p> - * <b> NOTE:</b> This array may contain null members if any of the individual file listings failed to parse. The caller should check each entry for - * null before referencing it, or use a filter such as {@link FTPFileFilters#NON_NULL} which does not allow null entries. + * <strong> NOTE:</strong> This array may contain null members if any of the individual file listings failed to parse. The caller should check each + * entry for null before referencing it, or use a filter such as {@link FTPFileFilters#NON_NULL} which does not allow null entries. * @since 3.9.0 */ public List<FTPFile> getFileList(final FTPFileFilter filter) { @@ -119,8 +119,8 @@ public class FTPListParseEngine { * be null * @throws IOException - not ever thrown, may be removed in a later release */ - public FTPFile[] getFiles() throws IOException // TODO remove; not actually thrown - { + // TODO remove; not actually thrown + public FTPFile[] getFiles() throws IOException { return getFiles(FTPFileFilters.NON_NULL); } @@ -132,30 +132,30 @@ public class FTPListParseEngine { * * @return an array of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. * <p> - * <b> NOTE:</b> This array may contain null members if any of the individual file listings failed to parse. The caller should check each entry for - * null before referencing it, or use a filter such as {@link FTPFileFilters#NON_NULL} which does not allow null entries. + * <strong> NOTE:</strong> This array may contain null members if any of the individual file listings failed to parse. The caller should check each + * entry for null before referencing it, or use a filter such as {@link FTPFileFilters#NON_NULL} which does not allow null entries. * @since 2.2 * @throws IOException - not ever thrown, may be removed in a later release */ - public FTPFile[] getFiles(final FTPFileFilter filter) throws IOException // TODO remove; not actually thrown - { + // TODO remove; not actually thrown + public FTPFile[] getFiles(final FTPFileFilter filter) throws IOException { return getFileList(filter).toArray(EMPTY_FTP_FILE_ARRAY); } /** * Returns an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position. If fewer than - * {@code quantityRequested} such elements are available, the returned array will have a length equal to the number of entries at and after the - * current position. If no such entries are found, this array will have a length of 0. + * {@code quantityRequested} such elements are available, the returned array will have a length equal to the number of entries at and after the current + * position. If no such entries are found, this array will have a length of 0. * * After this method is called this object's internal iterator is advanced by a number of positions equal to the size of the array returned. * * @param quantityRequested the maximum number of entries we want to get. * - * @return an array of at most {@code quantityRequested} FTPFile objects starting at the current position of this iterator within its list and at least - * the number of elements which exist in the list at and after its current position. + * @return an array of at most {@code quantityRequested} FTPFile objects starting at the current position of this iterator within its list and at least the + * number of elements which exist in the list at and after its current position. * <p> - * <b> NOTE:</b> This array may contain null members if any of the individual file listings failed to parse. The caller should check each entry for - * null before referencing it. + * <strong> NOTE:</strong> This array may contain null members if any of the individual file listings failed to parse. The caller should check each + * entry for null before referencing it. */ public FTPFile[] getNext(final int quantityRequested) { final List<FTPFile> tmpResults = new LinkedList<>(); @@ -174,22 +174,22 @@ public class FTPListParseEngine { } /** - * Returns an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position, and working - * back toward the beginning. + * Returns an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position, and working back + * toward the beginning. * - * If fewer than {@code quantityRequested} such elements are available, the returned array will have a length equal to the number of entries at and - * after the current position. If no such entries are found, this array will have a length of 0. + * If fewer than {@code quantityRequested} such elements are available, the returned array will have a length equal to the number of entries at and after + * the current position. If no such entries are found, this array will have a length of 0. * * After this method is called this object's internal iterator is moved back by a number of positions equal to the size of the array returned. * * @param quantityRequested the maximum number of entries we want to get. * - * @return an array of at most {@code quantityRequested} FTPFile objects starting at the current position of this iterator within its list and at least - * the number of elements which exist in the list at and after its current position. This array will be in the same order as the underlying list - * (not reversed). + * @return an array of at most {@code quantityRequested} FTPFile objects starting at the current position of this iterator within its list and at least the + * number of elements which exist in the list at and after its current position. This array will be in the same order as the underlying list (not + * reversed). * <p> - * <b> NOTE:</b> This array may contain null members if any of the individual file listings failed to parse. The caller should check each entry for - * null before referencing it. + * <strong> NOTE:</strong> This array may contain null members if any of the individual file listings failed to parse. The caller should check each + * entry for null before referencing it. */ public FTPFile[] getPrevious(final int quantityRequested) { final List<FTPFile> tmpResults = new LinkedList<>(); @@ -225,9 +225,9 @@ public class FTPListParseEngine { } /** - * Internal method for reading (and closing) the input into the {@code entries} list. After this method has completed, {@code entries} will - * contain a collection of entries (as defined by {@code FTPFileEntryParser.readNextEntry()}), but this may contain various non-entry preliminary lines - * from the server output, duplicates, and other data that will not be part of the final listing. + * Internal method for reading (and closing) the input into the {@code entries} list. After this method has completed, {@code entries} will contain a + * collection of entries (as defined by {@code FTPFileEntryParser.readNextEntry()}), but this may contain various non-entry preliminary lines from the + * server output, duplicates, and other data that will not be part of the final listing. * * @param inputStream The socket stream on which the input will be read. * @param charsetName The encoding to use. diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSClient.java b/src/main/java/org/apache/commons/net/ftp/FTPSClient.java index e2563e83..806e1c0e 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPSClient.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPSClient.java @@ -517,7 +517,8 @@ public class FTPSClient extends FTPClient { * <li>E - Confidential(SSL protocol only)</li> * <li>P - Private</li> * </ul> - * <b>N.B.</b> the method calls {@link #setSocketFactory(javax.net.SocketFactory)} and {@link #setServerSocketFactory(javax.net.ServerSocketFactory)} + * <strong>N.B.</strong> the method calls {@link #setSocketFactory(javax.net.SocketFactory)} and + * {@link #setServerSocketFactory(javax.net.ServerSocketFactory)} * * @param prot Data Channel Protection Level, if {@code null}, use {@link #DEFAULT_PROT}. * @throws SSLException If the server reply code does not equal {@code 200}. 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 258b4718..3a0304a0 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 @@ -69,9 +69,9 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto * command to identify systems. * <p> * If {@code key} is not recognized as a fully qualified class name known to the system, this method will then attempt to see whether it - * <b>contains</b> a string identifying one of the known parsers. This comparison is <b>case-insensitive</b>. The intent here is where possible, to select - * as keys strings which are returned by the SYST command on the systems which the corresponding parser successfully parses. This enables this factory to be - * used in the auto-detection system. + * <strong>contains</strong> a string identifying one of the known parsers. This comparison is <strong>case-insensitive</strong>. The intent here is where + * possible, to select as keys strings which are returned by the SYST command on the systems which the corresponding parser successfully parses. This + * enables this factory to be used in the auto-detection system. * </p> * * @param key should be a fully qualified class name corresponding to a class implementing the FTPFileEntryParser interface<br> diff --git a/src/main/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java index 65c42b0a..cb870b86 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java @@ -38,7 +38,7 @@ import org.apache.commons.net.ftp.FTPFile; public class EnterpriseUnixFTPEntryParser extends RegexFTPFileEntryParserImpl { /** - * months abbreviations looked for by this parser. Also used to determine <b>which</b> month has been matched by the parser. + * months abbreviations looked for by this parser. Also used to determine <strong>which</strong> month has been matched by the parser. */ private static final String MONTHS = "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"; diff --git a/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java index 000e542b..3b9beef0 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java @@ -93,14 +93,14 @@ public class NetwareFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { * <p> * Netware file permissions are in the following format: RWCEAFMS, and are explained as follows: * <ul> - * <li><b>S</b> - Supervisor; All rights. - * <li><b>R</b> - Read; Right to open and read or execute. - * <li><b>W</b> - Write; Right to open and modify. - * <li><b>C</b> - Create; Right to create; when assigned to a file, allows a deleted file to be recovered. - * <li><b>E</b> - Erase; Right to delete. - * <li><b>M</b> - Modify; Right to rename a file and to change attributes. - * <li><b>F</b> - File Scan; Right to see directory or file listings. - * <li><b>A</b> - Access Control; Right to modify trustee assignments and the Inherited Rights Mask. + * <li><strong>S</strong> - Supervisor; All rights. + * <li><strong>R</strong> - Read; Right to open and read or execute. + * <li><strong>W</strong> - Write; Right to open and modify. + * <li><strong>C</strong> - Create; Right to create; when assigned to a file, allows a deleted file to be recovered. + * <li><strong>E</strong> - Erase; Right to delete. + * <li><strong>M</strong> - Modify; Right to rename a file and to change attributes. + * <li><strong>F</strong> - File Scan; Right to see directory or file listings. + * <li><strong>A</strong> - Access Control; Right to modify trustee assignments and the Inherited Rights Mask. * </ul> * * See <a href="http://www.novell.com/documentation/nfap10/index.html?page=/documentation/nfap10/nfaubook/data/abxraws.html"> here</a> for more details diff --git a/src/main/java/org/apache/commons/net/imap/IMAPSClient.java b/src/main/java/org/apache/commons/net/imap/IMAPSClient.java index 93ce9037..88b63e94 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAPSClient.java +++ b/src/main/java/org/apache/commons/net/imap/IMAPSClient.java @@ -56,7 +56,7 @@ import org.apache.commons.net.util.SSLSocketUtils; * } * </pre> * - * <b>Warning</b>: the hostname is not verified against the certificate by default, use {@link #setHostnameVerifier(HostnameVerifier)} or + * <strong>Warning</strong>: the hostname is not verified against the certificate by default, use {@link #setHostnameVerifier(HostnameVerifier)} or * {@link #setEndpointCheckingEnabled(boolean)} (on Java 1.7+) to enable verification. */ public class IMAPSClient extends IMAPClient { diff --git a/src/main/java/org/apache/commons/net/smtp/RelayPath.java b/src/main/java/org/apache/commons/net/smtp/RelayPath.java index 7855137f..56fcfb50 100644 --- a/src/main/java/org/apache/commons/net/smtp/RelayPath.java +++ b/src/main/java/org/apache/commons/net/smtp/RelayPath.java @@ -42,7 +42,7 @@ public final class RelayPath { /** * Add a mail relay host to the relay path. Hosts are added left to right. For example, the following will create the path - * {@code <b> < @bar.com,@foo.com:foo...@foo.com > </b>} + * {@code <strong> < @bar.com,@foo.com:foo...@foo.com > </strong>} * * <pre> * path = new RelayPath("foo...@foo.com"); diff --git a/src/main/java/org/apache/commons/net/smtp/SMTPReply.java b/src/main/java/org/apache/commons/net/smtp/SMTPReply.java index 13c95894..cc759fcf 100644 --- a/src/main/java/org/apache/commons/net/smtp/SMTPReply.java +++ b/src/main/java/org/apache/commons/net/smtp/SMTPReply.java @@ -138,7 +138,7 @@ public final class SMTPReply { * responses are used to indicate tentative success. No further commands can be issued to the SMTP server after a positive preliminary response until a * follow-up response is received from the server. * <p> - * <b>Note:</b> <em> No SMTP commands defined in RFC 822 provide this type of reply. </em> + * <strong>Note:</strong> <em> No SMTP commands defined in RFC 822 provide this type of reply. </em> * </p> * * @param reply The reply code to test. diff --git a/src/test/java/org/apache/commons/net/daytime/MockDaytimeTCPServer.java b/src/test/java/org/apache/commons/net/daytime/MockDaytimeTCPServer.java index d4470fc5..858175d9 100644 --- a/src/test/java/org/apache/commons/net/daytime/MockDaytimeTCPServer.java +++ b/src/test/java/org/apache/commons/net/daytime/MockDaytimeTCPServer.java @@ -43,7 +43,7 @@ import org.apache.commons.net.MockTcpServer; * This implementation uses {@link MockDaytimeTCPServer#enqueue(Clock)} and {@link BlockingQueue<Clock>} to queue next {@link Clock} that will be used to obtain and * write daytime data into {@code clientSocket}. * </p> - * <p>NOTE: this is for <b>debugging and testing purposes only</b> and not meant to be run as a reliable server.</p> + * <p>NOTE: this is for <strong>debugging and testing purposes only</strong> and not meant to be run as a reliable server.</p> * @see MockTcpServer * @see DaytimeTCPClientTest DaytimeTCPClientTest (for example usage in tests) */