This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 1.2.X
in repository https://gitbox.apache.org/repos/asf/mina-ftpserver.git


The following commit(s) were added to refs/heads/1.2.X by this push:
     new ef528368 Fixed some checkstyle warnings
ef528368 is described below

commit ef528368bb6f3af87307082376f40306170fb7cc
Author: emmanuel lecharny <elecha...@apache.org>
AuthorDate: Mon Jan 6 14:18:04 2025 +0100

    Fixed some checkstyle warnings
---
 .../java/org/apache/ftpserver/ftplet/FtpFile.java  | 46 ++++++++++++++++------
 .../org/apache/ftpserver/ftplet/FtpSession.java    | 30 +++++++++++---
 2 files changed, 58 insertions(+), 18 deletions(-)

diff --git a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpFile.java 
b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpFile.java
index 2192a3d3..6db33e0d 100644
--- a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpFile.java
+++ b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpFile.java
@@ -30,9 +30,9 @@ import java.util.List;
  * @author <a href="http://mina.apache.org";>Apache MINA Project</a>
  */
 public interface FtpFile {
-
     /**
      * Get the full path from the base directory of the FileSystemView.
+     *
      * @return a path where the path separator is '/' (even if the operating 
system
      *     uses another character as path separator).
      */
@@ -40,78 +40,91 @@ public interface FtpFile {
 
     /**
      * Get the file name of the file.
+     *
      * @return the last part of the file path (the part after the last '/').
      */
     String getName();
 
     /**
      * Is the file hidden?
-     * @return true if the {@link FtpFile} is hidden
+     *
+     * @return <code>true</code> if the {@link FtpFile} is hidden
      */
     boolean isHidden();
 
     /**
      * Is it a directory?
-     * @return true if the {@link FtpFile} is a directory
+     *
+     * @return <code>true</code> if the {@link FtpFile} is a directory
      */
     boolean isDirectory();
 
     /**
      * Is it a file?
-     * @return true if the {@link FtpFile} is a file, false if it is a 
directory
+     *
+     * @return <code>true</code> if the {@link FtpFile} is a file, false if it 
is a directory
      */
     boolean isFile();
 
     /**
      * Does this file exists?
-     * @return true if the {@link FtpFile} exists
+     *
+     * @return <code>true</code> if the {@link FtpFile} exists
      */
     boolean doesExist();
 
     /**
      * Has read permission?
-     * @return true if the {@link FtpFile} is readable by the user
+     *
+     * @return <code>true</code> if the {@link FtpFile} is readable by the user
      */
     boolean isReadable();
 
     /**
      * Has write permission?
-     * @return true if the {@link FtpFile} is writable by the user
+     *
+     * @return <code>true</code> if the {@link FtpFile} is writable by the user
      */
     boolean isWritable();
 
     /**
      * Has delete permission?
-     * @return true if the {@link FtpFile} is removable by the user
+     *
+     * @return <code>true</code> if the {@link FtpFile} is removable by the 
user
      */
     boolean isRemovable();
 
     /**
      * Get the owner name.
+     *
      * @return The name of the owner of the {@link FtpFile}
      */
     String getOwnerName();
 
     /**
      * Get owner group name.
+     *
      * @return The name of the group that owns the {@link FtpFile}
      */
     String getGroupName();
 
     /**
      * Get link count.
+     *
      * @return The number of links for the {@link FtpFile}
      */
     int getLinkCount();
 
     /**
      * Get last modified time in UTC.
+     *
      * @return The timestamp of the last modified time for the {@link FtpFile}
      */
     long getLastModified();
 
     /**
      * Set the last modified time stamp of a file.
+     *
      * @param time The last modified time, in milliseconds since the epoch.
      * See {@link java.io.File#setLastModified(long)}.
      * @return <code>true</code> if and only if the operation succeeded; 
<code>false</code> otherwise
@@ -120,6 +133,7 @@ public interface FtpFile {
 
     /**
      * Get file size.
+     *
      * @return The size of the {@link FtpFile} in bytes
      */
     long getSize();
@@ -135,20 +149,23 @@ public interface FtpFile {
 
     /**
      * Create directory.
-     * @return true if the operation was successful
+     *
+     * @return <code>true</code> if the operation was successful
      */
     boolean mkdir();
 
     /**
      * Delete file.
-     * @return true if the operation was successful
+     *
+     * @return <code>true</code> if the operation was successful
      */
     boolean delete();
 
     /**
      * Move file.
+     *
      * @param destination The target {@link FtpFile} to move the current 
{@link FtpFile} to
-     * @return true if the operation was successful
+     * @return <code>true</code> if the operation was successful
      */
     boolean move(FtpFile destination);
 
@@ -156,27 +173,30 @@ public interface FtpFile {
      * List file objects. If not a directory or does not exist, null will be
      * returned. Files must be returned in alphabetical order.
      * List must be immutable.
+     *
      * @return The {@link List} of {@link FtpFile}s
      */
     List<? extends FtpFile> listFiles();
 
     /**
      * Create output stream for writing.
+     *
      * @param offset The number of bytes at where to start writing.
      *      If the file is not random accessible,
      *      any offset other than zero will throw an exception.
      * @return An {@link OutputStream} used to write to the {@link FtpFile}
-     * @throws IOException
+     * @throws IOException If the OutputStream creation failed
      */
     OutputStream createOutputStream(long offset) throws IOException;
 
     /**
      * Create input stream for reading.
+     *
      * @param offset The number of bytes of where to start reading.
      *          If the file is not random accessible,
      *          any offset other than zero will throw an exception.
      * @return An {@link InputStream} used to read the {@link FtpFile}
-     * @throws IOException
+     * @throws IOException If the InputStream creation failed
      */
     InputStream createInputStream(long offset) throws IOException;
 }
diff --git 
a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpSession.java 
b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpSession.java
index a947e230..512b86f5 100644
--- a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpSession.java
+++ b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/FtpSession.java
@@ -35,51 +35,58 @@ import java.util.UUID;
  * @author <a href="http://mina.apache.org";>Apache MINA Project</a>
  */
 public interface FtpSession {
-
     /**
      * Returns the IP address of the client that sent the request.
+     *
      * @return The client {@link InetAddress}
      */
     InetSocketAddress getClientAddress();
 
     /**
      * Returns the IP address of the server
+     *
      * @return The server {@link InetAddress}
      */
     InetSocketAddress getServerAddress();
 
     /**
      * Get FTP data connection factory, used to transfer data to and from the 
client.
+     *
      * @return The {@link DataConnectionFactory}
      */
     DataConnectionFactory getDataConnection();
 
     /**
      * Retrieve the certificates for the client, if running over SSL and with 
client authentication
+     *
      * @return The Certificate chain, or null if the certificates are not 
avialble
      */
     Certificate[] getClientCertificates();
 
     /**
      * Get connection time.
+     *
      * @return Time when the client connected to the server
      */
     Date getConnectionTime();
 
     /**
      * Get the login time.
+     *
      * @return Time when the client logged into the server
      */
     Date getLoginTime();
 
     /**
      * Get the number of failed logins.
+     *
      * @return The number of failed logins. When login succeeds, this will 
return 0.
      */
     int getFailedLogins();
 
     /**
      * Get last access time.
+     *
      * @return The last time the session performed any action
      */
     Date getLastAccessTime();
@@ -87,6 +94,7 @@ public interface FtpSession {
     /**
      * Returns maximum idle time. This time equals to
      * {@link User#getMaxIdleTime()} after user login.
+     *
      * @return The number of seconds the client is allowed to be idle before 
disconnected.
      */
     int getMaxIdleTime();
@@ -94,12 +102,14 @@ public interface FtpSession {
     /**
      * Set maximum idle time in seconds. This time equals to
      * {@link User#getMaxIdleTime()} after user login.
+     *
      * @param maxIdleTimeSec The number of seconds the client is allowed to be 
idle before disconnected.
      */
     void setMaxIdleTime(int maxIdleTimeSec);
 
     /**
      * Get user object.
+     *
      * @return The current {@link User}
      */
     User getUser();
@@ -113,48 +123,56 @@ public interface FtpSession {
 
     /**
      * Get the requested language.
+     *
      * @return The language requested by the client
      */
     String getLanguage();
 
     /**
      * Is the user logged in?
-     * @return true if the user is logged in
+     *
+     * @return <code>true</code> if the user is logged in
      */
     boolean isLoggedIn();
 
     /**
      * Get user file system view.
+     *
      * @return The {@link FileSystemView} for this session/user
      */
     FileSystemView getFileSystemView();
 
     /**
      * Get file upload/download offset.
+     *
      * @return The current file transfer offset, or 0 if non is set
      */
     long getFileOffset();
 
     /**
      * Get rename from file object.
+     *
      * @return The current rename from, or null if non is set
      */
     FtpFile getRenameFrom();
 
     /**
      * Get the data type.
+     *
      * @return The current {@link DataType} for this session
      */
     DataType getDataType();
 
     /**
      * Get structure.
+     *
      * @return The current {@link Structure} for this session
      */
     Structure getStructure();
 
     /**
      * Returns the value of the named attribute as an Object.
+     *
      * @param name The attribute name
      * @return The attribute value, or null if no
      * attribute of the given name exists.
@@ -164,6 +182,7 @@ public interface FtpSession {
     /**
      * Stores an attribute in this request. It will be available until it was
      * removed or when the connection ends.
+     *
      * @param name The attribute name
      * @param value The attribute value
      */
@@ -171,6 +190,7 @@ public interface FtpSession {
 
     /**
      * Removes an attribute from this request.
+     *
      * @param name The attribute name
      */
     void removeAttribute(String name);
@@ -178,9 +198,8 @@ public interface FtpSession {
     /**
      * Write a reply to the client
      *
-     * @param reply
-     *            The reply that will be sent to the client
-     * @throws FtpException
+     * @param reply The reply that will be sent to the client
+     * @throws FtpException If the write failed
      */
     void write(FtpReply reply) throws FtpException;
 
@@ -196,6 +215,7 @@ public interface FtpSession {
      * Get the unique ID for this session. This ID will be maintained for
      * the entire session and is also available to MDC logging using the 
"session"
      * identifier.
+     *
      * @return The unique ID for this session
      */
     UUID getSessionId();

Reply via email to