commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1807538 - in /commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons: AbstractVfsTestCase.java vfs2/provider/webdav/test/JcrUtils.java vfs2/test/VerifyingFileSelector.java
Date Wed, 06 Sep 2017 22:08:43 GMT
Author: ggregory
Date: Wed Sep  6 22:08:43 2017
New Revision: 1807538

URL: http://svn.apache.org/viewvc?rev=1807538&view=rev
Log:
Do not need to nest else block.

Modified:
    commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/AbstractVfsTestCase.java
    commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java
    commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/VerifyingFileSelector.java

Modified: commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/AbstractVfsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/AbstractVfsTestCase.java?rev=1807538&r1=1807537&r2=1807538&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/AbstractVfsTestCase.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/AbstractVfsTestCase.java
Wed Sep  6 22:08:43 2017
@@ -63,10 +63,7 @@ public abstract class AbstractVfsTestCas
         {
             return "";
         }
-        else
-        {
-            return name.substring(0, name.lastIndexOf("."));
-        }
+        return name.substring(0, name.lastIndexOf("."));
     }
 
     /**

Modified: commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java?rev=1807538&r1=1807537&r2=1807538&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java
Wed Sep  6 22:08:43 2017
@@ -95,10 +95,8 @@ class JcrUtils
         if (parent.hasNode(name))
         {
             return parent.getNode(name);
-        } else
-        {
-            return parent.addNode(name, type);
         }
+        return parent.addNode(name, type);
     }
 
     /**

Modified: commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/VerifyingFileSelector.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/VerifyingFileSelector.java?rev=1807538&r1=1807537&r2=1807538&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/VerifyingFileSelector.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/VerifyingFileSelector.java
Wed Sep  6 22:08:43 2017
@@ -129,12 +129,9 @@ public class VerifyingFileSelector
             assertEquals(rootFile.baseName, baseName);
             return rootFile;
         }
-        else
-        {
-            final FileInfo child = currentFolderInfo.children.get(baseName);
-            assertNotNull("Could not locate child " + baseName, child);
-            return child;
-        }
+        final FileInfo child = currentFolderInfo.children.get(baseName);
+        assertNotNull("Could not locate child " + baseName, child);
+        return child;
     }
 
     /**



Mime
View raw message