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 23ec1a8  VFS-803 - Simplify if as some conditions are covered by 
others (#173)
23ec1a8 is described below

commit 23ec1a8c7b5d377158aeb3b5d86f19a129e0df5a
Author: Arturo Bernal <arturobern...@gmail.com>
AuthorDate: Fri Jul 16 21:56:28 2021 +0200

    VFS-803 - Simplify if as some conditions are covered by others (#173)
---
 .../main/java/org/apache/commons/vfs2/provider/AbstractFileName.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
index 8490685..520509e 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
@@ -524,10 +524,7 @@ public abstract class AbstractFileName implements FileName 
{
         if (scope == NameScope.DESCENDENT_OR_SELF) {
             return baseLen <= 1 || path.length() <= baseLen || 
path.charAt(baseLen) == SEPARATOR_CHAR;
         }
-        if (scope != NameScope.FILE_SYSTEM) {
-            throw new IllegalArgumentException();
-        }
+        throw new IllegalArgumentException();
 
-        return true;
     }
 }

Reply via email to