commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1203703 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: ./ provider/ftp/ provider/http/ provider/ram/ provider/sftp/
Date Fri, 18 Nov 2011 15:32:02 GMT
Author: ggregory
Date: Fri Nov 18 15:32:02 2011
New Revision: 1203703

URL: http://svn.apache.org/viewvc?rev=1203703&view=rev
Log:
Use the Integer cache, don't create new Integers if not needed.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.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/HttpFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java?rev=1203703&r1=1203702&r2=1203703&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java
Fri Nov 18 15:32:02 2011
@@ -240,7 +240,7 @@ public abstract class FileSystemConfigBu
     /** @since 2.0 */
     protected int getInteger(FileSystemOptions opts, String name, int defaultValue)
     {
-        return getInteger(opts, name, new Integer(defaultValue)).intValue();
+        return getInteger(opts, name, Integer.valueOf(defaultValue)).intValue();
     }
 
     /** @since 2.0 */

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=1203703&r1=1203702&r2=1203703&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
Fri Nov 18 15:32:02 2011
@@ -157,7 +157,7 @@ public class FtpFileObject extends Abstr
                             log.debug(Messages.getString("vfs.provider.ftp/invalid-directory-entry.debug",
                                 new Object[]
                                     {
-                                        new Integer(i), relPath
+                                        Integer.valueOf(i), relPath
                                     }));
                         }
                         continue;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java?rev=1203703&r1=1203702&r2=1203703&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java
Fri Nov 18 15:32:02 2011
@@ -99,7 +99,7 @@ public class HttpFileSystemConfigBuilder
      */
     public void setProxyPort(FileSystemOptions opts, int proxyPort)
     {
-        setParam(opts, "proxyPort", new Integer(proxyPort));
+        setParam(opts, "proxyPort", Integer.valueOf(proxyPort));
     }
 
     /**
@@ -176,7 +176,7 @@ public class HttpFileSystemConfigBuilder
      */
     public void setMaxTotalConnections(FileSystemOptions opts, int maxTotalConnections)
     {
-        setParam(opts, HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, new Integer(maxTotalConnections));
+        setParam(opts, HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, Integer.valueOf(maxTotalConnections));
     }
 
     /**
@@ -198,7 +198,7 @@ public class HttpFileSystemConfigBuilder
      */
     public void setMaxConnectionsPerHost(FileSystemOptions opts, int maxHostConnections)
     {
-        setParam(opts, HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, new Integer(maxHostConnections));
+        setParam(opts, HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, Integer.valueOf(maxHostConnections));
     }
 
     /**

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java?rev=1203703&r1=1203702&r2=1203703&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java
Fri Nov 18 15:32:02 2011
@@ -76,7 +76,7 @@ public final class RamFileSystemConfigBu
      */
     public void setMaxSize(FileSystemOptions opts, int sizeInBytes)
     {
-        setParam(opts, MAX_SIZE_KEY, new Integer(sizeInBytes));
+        setParam(opts, MAX_SIZE_KEY, Integer.valueOf(sizeInBytes));
     }
 
 }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1203703&r1=1203702&r2=1203703&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java
Fri Nov 18 15:32:02 2011
@@ -297,7 +297,7 @@ public final class SftpFileSystemConfigB
      */
     public void setProxyPort(FileSystemOptions opts, int proxyPort)
     {
-        setParam(opts, "proxyPort", new Integer(proxyPort));
+        setParam(opts, "proxyPort", Integer.valueOf(proxyPort));
     }
 
     /**



Mime
View raw message