You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/10/17 07:41:23 UTC

[GitHub] [commons-vfs] mperever commented on a diff in pull request #318: Add active port range configuration for ftp client factory

mperever commented on code in PR #318:
URL: https://github.com/apache/commons-vfs/pull/318#discussion_r996709308


##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpActivePortRange.java:
##########
@@ -0,0 +1,123 @@
+package org.apache.commons.vfs2.provider.ftp;
+
+import java.io.Serializable;
+
+/**
+ * The FTP active port range.
+ */
+public final class FtpActivePortRange implements Serializable {
+
+    /**
+     * Serialization version.
+     *
+     * @see java.io.Serializable
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Obtains FTP active port range with the specified minimum and maximum values (both inclusive).
+     *
+     * @param minimum the minimum port (inclusive)
+     * @param maximum the maximum port (inclusive)
+     * @throws IllegalArgumentException if minimum value is greater than maximum one
+     */
+    public static FtpActivePortRange of(final int minimum, final int maximum) {
+        return new FtpActivePortRange(minimum, maximum);
+    }
+
+    /**
+     * The minimum value in this range (inclusive).
+     */
+    private final int minimum;

Review Comment:
   will do, thx



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org