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 561bea7a Simplify conditions and avoid extra checks (#253)
561bea7a is described below
commit 561bea7a63ce571886168b5488d8ba3dad5d9aab
Author: Arturo Bernal <[email protected]>
AuthorDate: Wed Apr 20 13:53:39 2022 +0200
Simplify conditions and avoid extra checks (#253)
---
.../apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java | 3 ---
.../src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java
index 8386f468..9cfe701d 100644
---
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java
+++
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java
@@ -170,9 +170,6 @@ public final class FtpsFileSystemConfigBuilder extends
FtpFileSystemConfigBuilde
final FtpsMode mode;
if (ftpsType != null) {
mode = FtpsMode.valueOf(ftpsType.toUpperCase());
- if (mode == null) {
- throw new IllegalArgumentException("Not a proper FTPS mode: "
+ ftpsType);
- }
} else {
mode = null;
}
diff --git
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
index b4d1fd78..d61df19a 100644
---
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
+++
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/FileObjectUtils.java
@@ -69,7 +69,7 @@ public final class FileObjectUtils {
}
throw new
FileSystemException("vfs.util/find-abstract-file-object.error",
- fileObject == null ? "null" : fileObject.getClass().getName());
+ fileObject.getClass().getName());
}
/**