This is an automated email from the ASF dual-hosted git repository. elecharny pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mina-ftpserver.git
The following commit(s) were added to refs/heads/master by this push: new 92fbe58 Fixed the requuired checkstyle version, fixed some chekstyle errors 92fbe58 is described below commit 92fbe586b61c9a75dbf057be4b42e5f255932e83 Author: emmanuel lecharny <elecha...@apache.org> AuthorDate: Tue Jan 4 11:23:58 2022 +0100 Fixed the requuired checkstyle version, fixed some chekstyle errors --- checkstyle.xml | 3 +++ .../ftpserver/ftplet/DataTransferFtpReply.java | 6 +++--- .../java/org/apache/ftpserver/ftplet/Ftplet.java | 22 +++++++++++----------- pom.xml | 17 +++++++++++++++-- 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index aedcb2e..d3e35d0 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -24,6 +24,9 @@ limitations under the License. <module name="Checker"> <property name="localeLanguage" value="en"/> <module name="JavadocPackage"/> + <module name="LineLength"> + <property name="max" value="120"/> + </module> <module name="NewlineAtEndOfFile"> <property name="lineSeparator" value="lf" /> </module> diff --git a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/DataTransferFtpReply.java b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/DataTransferFtpReply.java index f486a99..3812733 100644 --- a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/DataTransferFtpReply.java +++ b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/DataTransferFtpReply.java @@ -23,15 +23,15 @@ package org.apache.ftpserver.ftplet; * A more specific type of FTP reply that is sent by the commands that transfer * data over the data connection. These commands include LIST, RETR, STOR, STOU * etc. - * + * * @author <a href="http://mina.apache.org">Apache MINA Project</a> - * + * */ public interface DataTransferFtpReply extends FileActionFtpReply { /** * Returns the number of bytes transferred. - * + * * @return the number of bytes transferred. */ long getBytesTransferred(); diff --git a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/Ftplet.java b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/Ftplet.java index 605ae38..b503b97 100644 --- a/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/Ftplet.java +++ b/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/Ftplet.java @@ -23,14 +23,14 @@ import java.io.IOException; /** * Defines methods that all ftplets must implement. - * + * * A ftplet is a small Java program that runs within an FTP server. Ftplets * receive and respond to requests from FTP clients. - * + * * This interface defines methods to initialize a ftplet, to service requests, * and to remove a ftplet from the server. These are known as life-cycle methods * and are called in the following sequence: - * + * * <ol> * <li>The ftplet is constructed.</li> * <li>Then initialized with the init method.</li> @@ -39,7 +39,7 @@ import java.io.IOException; * method.</li> * <li>Then garbage collected and finalized.</li> * </ol> - * + * * All the callback methods return FtpletEnum. If it returns null * FtpletEnum.DEFAULT will be assumed. If any ftplet callback method throws * exception, that particular connection will be disconnected. @@ -54,7 +54,7 @@ public interface Ftplet { * exactly once after instantiating the ftplet. The init method must * complete successfully before the ftplet can receive any requests. * @param ftpletContext The current {@link FtpletContext} - * @throws FtpException + * @throws FtpException */ void init(FtpletContext ftpletContext) throws FtpException; @@ -84,7 +84,7 @@ public interface Ftplet { * disconnect the client.</li> * <li>Ftplet throws exception: Same as {@link FtpletResult#DISCONNECT}</li> * </ul> - * + * * @param session * The current session * @param request @@ -109,7 +109,7 @@ public interface Ftplet { * disconnect the client.</li> * <li>Ftplet throws exception: Same as {@link FtpletResult#DISCONNECT}</li> * </ul> - * + * * @param session * The current session * @param request @@ -129,8 +129,8 @@ public interface Ftplet { * Client connect notification method. * @param session The current {@link FtpSession} * @return The desired action to be performed by the server - * @throws FtpException - * @throws IOException + * @throws FtpException + * @throws IOException */ FtpletResult onConnect(FtpSession session) throws FtpException, IOException; @@ -138,8 +138,8 @@ public interface Ftplet { * Client disconnect notification method. This is the last callback method. * @param session The current {@link FtpSession} * @return The desired action to be performed by the server - * @throws FtpException - * @throws IOException + * @throws FtpException + * @throws IOException */ FtpletResult onDisconnect(FtpSession session) throws FtpException, IOException; diff --git a/pom.xml b/pom.xml index e7bd401..8f492eb 100644 --- a/pom.xml +++ b/pom.xml @@ -174,7 +174,7 @@ <slf4j.log4j12.version>1.7.32</slf4j.log4j12.version> <spring.context.version>2.5.5</spring.context.version> <checkstyle.plugin.version>3.1.2</checkstyle.plugin.version> - <checkstyle.version>8.45.1</checkstyle.version> + <checkstyle.version>9.2.1</checkstyle.version> <checkstyle.configdir>${basedir}</checkstyle.configdir> </properties> @@ -334,6 +334,19 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${checkstyle.plugin.version}</version> + <dependencies> + <dependency> + <groupId>com.puppycrawl.tools</groupId> + <artifactId>checkstyle</artifactId> + <version>${checkstyle.version}</version> + </dependency> + </dependencies> + </plugin> </plugins> </pluginManagement> @@ -526,7 +539,7 @@ <dependency> <groupId>com.puppycrawl.tools</groupId> <artifactId>checkstyle</artifactId> - <version>9.2</version> + <version>${checksytyle.version}</version> </dependency> </dependencies> <executions>