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-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new 91f5763  Use ternary expression.
91f5763 is described below

commit 91f576325b95756dfea7017dc5ee53f5c89d76f7
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Mar 3 08:42:39 2021 -0500

    Use ternary expression.
---
 .../java/org/apache/commons/vfs2/provider/GenericFileName.java    | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericFileName.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericFileName.java
index 7b4bf4a..354a1ac 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericFileName.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/GenericFileName.java
@@ -34,17 +34,13 @@ public class GenericFileName extends AbstractFileName {
     private final int port;
 
     protected GenericFileName(final String scheme, final String hostName, 
final int port, final int defaultPort,
-            final String userName, final String password, final String path, 
final FileType type) {
+        final String userName, final String password, final String path, final 
FileType type) {
         super(scheme, path, type);
         this.hostName = hostName;
         this.defaultPort = defaultPort;
         this.password = password;
         this.userName = userName;
-        if (port > 0) {
-            this.port = port;
-        } else {
-            this.port = getDefaultPort();
-        }
+        this.port = port > 0 ? port : defaultPort;
     }
 
     /**

Reply via email to