commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1203699 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2: FileSystemConfigBuilder.java provider/ftp/FtpRandomAccessContent.java provider/http/HttpRandomAccessContent.java provider/sftp/SftpRandomAccessContent.java
Date Fri, 18 Nov 2011 15:30:19 GMT
Author: ggregory
Date: Fri Nov 18 15:30:18 2011
New Revision: 1203699

URL: http://svn.apache.org/viewvc?rev=1203699&view=rev
Log:
Use the Long cache, don't create new Longs 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/FtpRandomAccessContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpRandomAccessContent.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=1203699&r1=1203698&r2=1203699&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:30:18 2011
@@ -268,7 +268,7 @@ public abstract class FileSystemConfigBu
     /** @since 2.0 */
     protected long getLong(FileSystemOptions opts, String name, long defaultValue)
     {
-        return getLong(opts, name, new Long(defaultValue)).longValue();
+        return getLong(opts, name, Long.valueOf(defaultValue)).longValue();
     }
 
     /** @since 2.0 */

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpRandomAccessContent.java?rev=1203699&r1=1203698&r2=1203699&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpRandomAccessContent.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpRandomAccessContent.java
Fri Nov 18 15:30:18 2011
@@ -59,7 +59,7 @@ class FtpRandomAccessContent extends Abs
         if (pos < 0)
         {
             throw new FileSystemException("vfs.provider/random-access-invalid-position.error",
-                    new Long(pos));
+                    Long.valueOf(pos));
         }
         if (dis != null)
         {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java?rev=1203699&r1=1203698&r2=1203699&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpRandomAccessContent.java
Fri Nov 18 15:30:18 2011
@@ -65,7 +65,7 @@ class HttpRandomAccessContent extends Ab
         if (pos < 0)
         {
             throw new FileSystemException("vfs.provider/random-access-invalid-position.error",
-                    new Long(pos));
+                    Long.valueOf(pos));
         }
         if (dis != null)
         {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpRandomAccessContent.java?rev=1203699&r1=1203698&r2=1203699&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpRandomAccessContent.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpRandomAccessContent.java
Fri Nov 18 15:30:18 2011
@@ -62,7 +62,7 @@ class SftpRandomAccessContent extends Ab
         if (pos < 0)
         {
             throw new FileSystemException("vfs.provider/random-access-invalid-position.error",
-                    new Long(pos));
+                    Long.valueOf(pos));
         }
         if (dis != null)
         {



Mime
View raw message