commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1203796 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs2/ core/src/main/java/org/apache/commons/vfs2/impl/ core/src/main/java/org/apache/commons/vfs2/provider/ftp/ core/src/main/java/org/apache/commons/vfs2/util/ ...
Date Fri, 18 Nov 2011 19:33:54 GMT
Author: ggregory
Date: Fri Nov 18 19:33:54 2011
New Revision: 1203796

URL: http://svn.apache.org/viewvc?rev=1203796&view=rev
Log:
[VFS-390] Use variable argument list in org.apache.commons.vfs2.util.Messages instead of Object[]

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.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/util/DelegatingFileSystemOptionsBuilder.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java?rev=1203796&r1=1203795&r2=1203796&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemException.java
Fri Nov 18 19:33:54 2011
@@ -183,7 +183,7 @@ public class FileSystemException
     @Override
     public String getMessage()
     {
-        return Messages.getString(super.getMessage(), getInfo());
+        return Messages.getString(super.getMessage(), (Object[])getInfo());
     }
 
     /**

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java?rev=1203796&r1=1203795&r2=1203796&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java
Fri Nov 18 19:33:54 2011
@@ -346,7 +346,7 @@ public class StandardFileSystemManager
             if (!hasProvider(requiredScheme))
             {
                 final String msg = Messages.getString("vfs.impl/skipping-provider-scheme.debug",
-                    new String[]{classname, requiredScheme});
+                    classname, requiredScheme);
                 VfsLog.debug(getLogger(), getLogger(), msg);
                 return;
             }
@@ -359,7 +359,7 @@ public class StandardFileSystemManager
             if (!findClass(requiredClass))
             {
                 final String msg = Messages.getString("vfs.impl/skipping-provider.debug",
-                    new String[]{classname, requiredClass});
+                    classname, requiredClass);
                 VfsLog.debug(getLogger(), getLogger(), msg);
                 return;
             }

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=1203796&r1=1203795&r2=1203796&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 19:33:54 2011
@@ -155,10 +155,7 @@ public class FtpFileObject extends Abstr
                         if (log.isDebugEnabled())
                         {
                             log.debug(Messages.getString("vfs.provider.ftp/invalid-directory-entry.debug",
-                                new Object[]
-                                    {
-                                        Integer.valueOf(i), relPath
-                                    }));
+                                    Integer.valueOf(i), relPath));
                         }
                         continue;
                     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java?rev=1203796&r1=1203795&r2=1203796&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilder.java
Fri Nov 18 19:33:54 2011
@@ -274,12 +274,11 @@ public class DelegatingFileSystemOptions
         }
         if (valueClass != String.class)
         {
-            log.warn(Messages.getString("vfs.provider/config-unexpected-value-class.error",
new String[]
-            {
+            log.warn(Messages.getString("vfs.provider/config-unexpected-value-class.error",
                 valueClass.getName(),
                 ctx.scheme,
                 ctx.name
-            }));
+            ));
             return false;
         }
 

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java?rev=1203796&r1=1203795&r2=1203796&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/Messages.java
Fri Nov 18 19:33:54 2011
@@ -53,11 +53,16 @@ public final class Messages
 
     /**
      * Formats a message.
-     *
-     * @param code  The message code.
-     * @param param The message parameter.
+     * 
+     * @param code
+     *            The message code.
+     * @param param
+     *            The message parameter.
      * @return The formatted message.
+     * @deprecated Will be removed in 3.0 in favor of {@link #getString(String, Object[])}
When removed, calls to this method will
+     *             automatically recompile to {@link #getString(String, Object[])}
      */
+    @Deprecated
     public static String getString(final String code, final Object param)
     {
         return getString(code, new Object[]{param});
@@ -70,7 +75,7 @@ public final class Messages
      * @param params The message parameters.
      * @return The formatted message.
      */
-    public static String getString(final String code, final Object[] params)
+    public static String getString(final String code, final Object... params)
     {
         try
         {

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1203796&r1=1203795&r2=1203796&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Fri Nov 18 19:33:54 2011
@@ -23,16 +23,19 @@
 
   <body>
     <release version="2.1" date="TBD" description="">
+      <action issue="VFS-390" dev="ggregory" type="update">
+        Use variable argument list in org.apache.commons.vfs2.util.Messages instead of Object[].
+      </action>
       <action issue="VFS-389" dev="ggregory" type="update">
         Use variable argument lists in FileSystemException instead of Object[]s.
       </action>
-      <action issue="VFS-388" dev="ggregory" type="update">
+      <action issue="VFS-388" dev="ggregory" type="add">
         Build tests SFTP file system with an embedded SFTP server (Apache MINA).
       </action>
-      <action issue="VFS-387" dev="ggregory" type="update">
+      <action issue="VFS-387" dev="ggregory" type="add">
         Build tests FTP file system with an embedded FTP server (Apache MINA).
       </action>
-      <action issue="VFS-386" dev="ggregory" type="update">
+      <action issue="VFS-386" dev="ggregory" type="add">
         Build tests HTTP file system with an embedded HTTP server (Apache HttpComponent Core).
       </action>
       <action issue="VFS-385" dev="ggregory" type="update">



Mime
View raw message