commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1308126 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: auth/ impl/ provider/ provider/ftp/ provider/http/ provider/tar/ provider/webdav/ provider/zip/ util/
Date Sun, 01 Apr 2012 14:46:02 GMT
Author: ggregory
Date: Sun Apr  1 14:46:02 2012
New Revision: 1308126

URL: http://svn.apache.org/viewvc?rev=1308126&view=rev
Log:
Remove extra parens.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileContentInfoFactory.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/EncryptUtil.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java
Sun Apr  1 14:46:02 2012
@@ -60,9 +60,9 @@ public class StaticUserAuthenticator imp
     {
         final int prime = 37;
         int result = 1;
-        result = prime * result + ((domain == null) ? 0 : domain.hashCode());
-        result = prime * result + ((password == null) ? 0 : password.hashCode());
-        result = prime * result + ((username == null) ? 0 : username.hashCode());
+        result = prime * result + (domain == null ? 0 : domain.hashCode());
+        result = prime * result + (password == null ? 0 : password.hashCode());
+        result = prime * result + (username == null ? 0 : username.hashCode());
 
         return result;
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java
Sun Apr  1 14:46:02 2012
@@ -387,7 +387,7 @@ public class DefaultFileMonitor implemen
 
                 if (getChecksPerRun() > 0)
                 {
-                    if ((iterFileNames % getChecksPerRun()) == 0)
+                    if (iterFileNames % getChecksPerRun() == 0)
                     {
                         try
                         {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
Sun Apr  1 14:46:02 2012
@@ -79,7 +79,7 @@ public abstract class AbstractFileName i
 
         AbstractFileName that = (AbstractFileName) o;
 
-        return (getKey().equals(that.getKey()));
+        return getKey().equals(that.getKey());
     }
 
     @Override
@@ -366,7 +366,7 @@ public abstract class AbstractFileName i
     public int getDepth()
     {
         final int len = getPath().length();
-        if (len == 0 || (len == 1 && getPath().charAt(0) == SEPARATOR_CHAR))
+        if (len == 0 || len == 1 && getPath().charAt(0) == SEPARATOR_CHAR)
         {
             return 0;
         }
@@ -393,7 +393,7 @@ public abstract class AbstractFileName i
             // do not treat filenames like
             // .bashrc c:\windows\.java c:\windows\.javaws c:\windows\.jedit c:\windows\.appletviewer
             // as extension
-            if ((pos < 1) || (pos == baseName.length() - 1))
+            if (pos < 1 || pos == baseName.length() - 1)
             {
                 // No extension
                 extension = "";
@@ -527,7 +527,7 @@ public abstract class AbstractFileName i
         if (scope == NameScope.CHILD)
         {
             if (path.length() == baseLen
-                || (baseLen > 1 && path.charAt(baseLen) != SEPARATOR_CHAR)
+                || baseLen > 1 && path.charAt(baseLen) != SEPARATOR_CHAR
                 || path.indexOf(SEPARATOR_CHAR, baseLen + 1) != -1)
             {
                 return false;
@@ -536,7 +536,7 @@ public abstract class AbstractFileName i
         else if (scope == NameScope.DESCENDENT)
         {
             if (path.length() == baseLen
-                || (baseLen > 1 && path.charAt(baseLen) != SEPARATOR_CHAR))
+                || baseLen > 1 && path.charAt(baseLen) != SEPARATOR_CHAR)
             {
                 return false;
             }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
Sun Apr  1 14:46:02 2012
@@ -1192,7 +1192,7 @@ public abstract class AbstractFileObject
                 attach();
                 doRename(destFile);
 
-                (FileObjectUtils.getAbstractFileObject(destFile)).handleCreate(getType());
+                FileObjectUtils.getAbstractFileObject(destFile).handleCreate(getType());
 
                 destFile.close(); // now the destFile is no longer imaginary. force reattach.
 
@@ -1215,10 +1215,10 @@ public abstract class AbstractFileObject
 
             destFile.copyFrom(this, Selectors.SELECT_SELF);
 
-            if (((destFile.getType().hasContent()
-                    && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE))
-                  || (destFile.getType().hasChildren()
-                    && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER)))
+            if ((destFile.getType().hasContent()
+                    && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE)
+                  || destFile.getType().hasChildren()
+                    && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER))
                     && getFileSystem().hasCapability(Capability.GET_LAST_MODIFIED))
             {
                 destFile.getContent().setLastModifiedTime(this.getContent().getLastModifiedTime());

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java
Sun Apr  1 14:46:02 2012
@@ -584,7 +584,7 @@ public class FtpFileObject extends Abstr
                 }
                 else
                 {
-                    return (timestamp.getTime().getTime());
+                    return timestamp.getTime().getTime();
                 }
             }
         }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java
Sun Apr  1 14:46:02 2012
@@ -34,8 +34,8 @@ public class HttpFileContentInfoFactory 
 {
     public FileContentInfo create(FileContent fileContent) throws FileSystemException
     {
-        HttpFileObject httpFile = (HttpFileObject) (FileObjectUtils
-            .getAbstractFileObject(fileContent.getFile()));
+        HttpFileObject httpFile = (HttpFileObject) FileObjectUtils
+            .getAbstractFileObject(fileContent.getFile());
 
         String contentType = null;
         String contentEncoding = null;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileObject.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileObject.java
Sun Apr  1 14:46:02 2012
@@ -62,7 +62,7 @@ public class TarFileObject extends Abstr
             return;
         }
 
-        if ((entry == null) || (entry.isDirectory()))
+        if (entry == null || entry.isDirectory())
         {
             type = FileType.FOLDER;
         }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileContentInfoFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileContentInfoFactory.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileContentInfoFactory.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileContentInfoFactory.java
Sun Apr  1 14:46:02 2012
@@ -38,8 +38,8 @@ public class WebdavFileContentInfoFactor
 {
     public FileContentInfo create(FileContent fileContent) throws FileSystemException
     {
-        WebdavFileObject file = (WebdavFileObject) (FileObjectUtils
-            .getAbstractFileObject(fileContent.getFile()));
+        WebdavFileObject file = (WebdavFileObject) FileObjectUtils
+            .getAbstractFileObject(fileContent.getFile());
 
         String contentType = null;
         String contentEncoding = null;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java
Sun Apr  1 14:46:02 2012
@@ -546,7 +546,7 @@ public class WebdavFileObject extends Ht
             path = path.substring(0, path.length() - 1);
         }
         final int i = path.lastIndexOf("/");
-        return (i >= 0) ? path.substring(i + 1) : path;
+        return i >= 0 ? path.substring(i + 1) : path;
     }
 
     private String urlString(URLFileName name)

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java
Sun Apr  1 14:46:02 2012
@@ -87,7 +87,7 @@ public class WebdavFileProvider
     {
         // Create the file system
         final GenericFileName rootName = (GenericFileName) name;
-        FileSystemOptions fsOpts = (fileSystemOptions == null) ? new FileSystemOptions()
: fileSystemOptions;
+        FileSystemOptions fsOpts = fileSystemOptions == null ? new FileSystemOptions() :
fileSystemOptions;
 
         UserAuthenticationData authData = null;
         HttpClient httpClient;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileObject.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileObject.java
Sun Apr  1 14:46:02 2012
@@ -65,7 +65,7 @@ public class ZipFileObject extends Abstr
             return;
         }
 
-        if ((entry == null) || (entry.isDirectory()))
+        if (entry == null || entry.isDirectory())
         {
             type = FileType.FOLDER;
         }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/EncryptUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/EncryptUtil.java?rev=1308126&r1=1308125&r2=1308126&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/EncryptUtil.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/EncryptUtil.java
Sun Apr  1 14:46:02 2012
@@ -39,7 +39,7 @@ public final class EncryptUtil
      */
     public static void main(String[] args) throws Exception
     {
-        if (args.length != 2 || !(args[0].equals("encrypt")))
+        if (args.length != 2 || !args[0].equals("encrypt"))
         {
             System.err.println("Usage: \"EncryptUtil encrypt\" password");
             System.err.println("     password : The clear text password to encrypt");



Mime
View raw message