You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gg...@apache.org on 2023/07/05 12:26:31 UTC

[mina-ftpserver] 04/04: Throw IllegalArgumentException instead of RuntimeException on bad input to FtpServerListener

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/mina-ftpserver.git

commit 135a79654171e363bbf9973b26986c850d4c1c9e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jul 5 08:26:14 2023 -0400

    Throw IllegalArgumentException instead of RuntimeException on bad input
    to FtpServerListener
---
 .../java/org/apache/ftpserver/example/springwar/FtpServerListener.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ftpserver-example-spring-war/src/main/java/org/apache/ftpserver/example/springwar/FtpServerListener.java b/examples/ftpserver-example-spring-war/src/main/java/org/apache/ftpserver/example/springwar/FtpServerListener.java
index c42782ef..315ff38b 100644
--- a/examples/ftpserver-example-spring-war/src/main/java/org/apache/ftpserver/example/springwar/FtpServerListener.java
+++ b/examples/ftpserver-example-spring-war/src/main/java/org/apache/ftpserver/example/springwar/FtpServerListener.java
@@ -70,7 +70,7 @@ public class FtpServerListener implements ServletContextListener {
             server.start();
             System.out.println("FtpServer started");
         } catch (Exception e) {
-            throw new RuntimeException("Failed to start FtpServer", e);
+            throw new IllegalArgumentException("Failed to start FtpServer", e);
         }
     }
 }