You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/04/11 15:01:00 UTC

[commons-vfs] branch master updated: Add and use FileOperationProvider.EMPTY_ARRAY.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new 4bf6fa2  Add and use FileOperationProvider.EMPTY_ARRAY.
4bf6fa2 is described below

commit 4bf6fa2c002ac3b265b4ea807a35827cdfa07e24
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Apr 11 11:00:56 2021 -0400

    Add and use FileOperationProvider.EMPTY_ARRAY.
    
    Update version from 2.8.1-SNAPSHOT to 2.9.0-SNAPSHOT.
---
 commons-vfs2-distribution/pom.xml                                  | 3 +--
 commons-vfs2-examples/pom.xml                                      | 3 +--
 commons-vfs2-jackrabbit1/pom.xml                                   | 2 +-
 commons-vfs2-jackrabbit2/pom.xml                                   | 2 +-
 commons-vfs2-sandbox/pom.xml                                       | 3 +--
 commons-vfs2/pom.xml                                               | 3 +--
 .../org/apache/commons/vfs2/impl/DefaultFileSystemManager.java     | 2 +-
 .../org/apache/commons/vfs2/operations/FileOperationProvider.java  | 7 +++++++
 pom.xml                                                            | 6 +++---
 src/changes/changes.xml                                            | 6 +++++-
 src/site/xdoc/index.xml                                            | 4 ++++
 11 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/commons-vfs2-distribution/pom.xml b/commons-vfs2-distribution/pom.xml
index 5875933..aa923b6 100644
--- a/commons-vfs2-distribution/pom.xml
+++ b/commons-vfs2-distribution/pom.xml
@@ -22,14 +22,13 @@ limitations under the License.
 
   <name>Apache Commons VFS Distribution</name>
   <artifactId>commons-vfs2-distribution</artifactId>
-  <version>2.8.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <description>Apache Commons VFS is a Virtual File System library - Distribution archives.</description>
 
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-vfs2-project</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>2.9.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/commons-vfs2-examples/pom.xml b/commons-vfs2-examples/pom.xml
index c05dd94..9e0a4fd 100644
--- a/commons-vfs2-examples/pom.xml
+++ b/commons-vfs2-examples/pom.xml
@@ -23,13 +23,12 @@
 
   <name>Apache Commons VFS Examples</name>
   <artifactId>commons-vfs2-examples</artifactId>
-  <version>2.8.1-SNAPSHOT</version>
   <description>Apache Commons VFS is a Virtual File System library - Examples.</description>
 
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-vfs2-project</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>2.9.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/commons-vfs2-jackrabbit1/pom.xml b/commons-vfs2-jackrabbit1/pom.xml
index e6130ee..03365fe 100644
--- a/commons-vfs2-jackrabbit1/pom.xml
+++ b/commons-vfs2-jackrabbit1/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-vfs2-project</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>2.9.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/commons-vfs2-jackrabbit2/pom.xml b/commons-vfs2-jackrabbit2/pom.xml
index 0240fa4..3188322 100644
--- a/commons-vfs2-jackrabbit2/pom.xml
+++ b/commons-vfs2-jackrabbit2/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-vfs2-project</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>2.9.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/commons-vfs2-sandbox/pom.xml b/commons-vfs2-sandbox/pom.xml
index 554df07..ea12a8e 100644
--- a/commons-vfs2-sandbox/pom.xml
+++ b/commons-vfs2-sandbox/pom.xml
@@ -23,13 +23,12 @@
 
   <name>Apache Commons VFS Sandbox</name>
   <artifactId>commons-vfs2-sandbox</artifactId>
-  <version>2.8.1-SNAPSHOT</version>
   <description>Apache Commons VFS is a Virtual File System library - Sandbox.</description>
 
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-vfs2-project</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>2.9.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/commons-vfs2/pom.xml b/commons-vfs2/pom.xml
index 93ff182..1c35df7 100644
--- a/commons-vfs2/pom.xml
+++ b/commons-vfs2/pom.xml
@@ -23,14 +23,13 @@
 
   <name>Apache Commons VFS</name>
   <artifactId>commons-vfs2</artifactId>
-  <version>2.8.1-SNAPSHOT</version>
   <description>Apache Commons VFS is a Virtual File System library.</description>
   <url>http://commons.apache.org/proper/commons-vfs/</url>
 
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-vfs2-project</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>2.9.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
index dd56a15..1232a1e 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
@@ -609,7 +609,7 @@ public class DefaultFileSystemManager implements FileSystemManager {
         if (providers == null || providers.isEmpty()) {
             return null;
         }
-        return providers.toArray(new FileOperationProvider[] {});
+        return providers.toArray(FileOperationProvider.EMPTY_ARRAY);
     }
 
     /**
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/FileOperationProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/FileOperationProvider.java
index 197397c..b0db835 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/FileOperationProvider.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/FileOperationProvider.java
@@ -27,6 +27,13 @@ import org.apache.commons.vfs2.FileSystemException;
  * @since 0.1
  */
 public interface FileOperationProvider {
+    
+    /**
+     * Empty array.
+     *
+     * @since 2.9.0
+     */
+    public static final FileOperationProvider[] EMPTY_ARRAY = {};
 
     /**
      * Gather available operations for the specified FileObject and put them into specified operationsList.
diff --git a/pom.xml b/pom.xml
index 3bf5fd3..67bba45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
   <name>Apache Commons VFS Project</name>
   <description>Apache Commons VFS is a Virtual File System library.</description>
   <packaging>pom</packaging>
-  <version>2.8.1-SNAPSHOT</version>
+  <version>2.9.0-SNAPSHOT</version>
 
   <url>http://commons.apache.org/proper/commons-vfs/</url>
   <inceptionYear>2002</inceptionYear>
@@ -52,7 +52,7 @@
     <connection>scm:git:https://gitbox.apache.org/repos/asf/commons-vfs.git</connection>
     <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-vfs.git</developerConnection>
     <url>https://gitbox.apache.org/repos/asf?p=commons-vfs.git</url>
-    <tag>commons-vfs-project-2.8.1</tag>
+    <tag>commons-vfs-project-2.9.0</tag>
   </scm>
 
   <developers>
@@ -160,7 +160,7 @@
     <commons.siteOutputDirectory>${basedir}/../target/site</commons.siteOutputDirectory>
     <commons.releaseNotesLocation>${basedir}/../RELEASE-NOTES.txt</commons.releaseNotesLocation>
     <commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
-    <commons.release.version>2.8.1</commons.release.version>
+    <commons.release.version>2.9.0</commons.release.version>
     <!-- Commons Release Plugin -->
     <commons.bc.version>2.8.0</commons.bc.version>
     <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3886b63..87bb5ba 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -45,7 +45,11 @@ The <action> type attribute can be add,update,fix,remove.
   </properties>
 
   <body>
-    <release version="2.8.1" date="2021-MM-DD" description="Maintenance release. Requires Java 8.">
+    <release version="2.9.0" date="2021-MM-DD" description="Maintenance release. Requires Java 8.">
+      <!-- ADDS -->
+      <action type="fix" dev="ggregory" due-to="Gary Gregory">
+        Add and use FileOperationProvider.EMPTY_ARRAY.
+      </action>      
       <!-- FIXES -->
       <action type="fix" dev="ggregory" due-to="Boris Petrov">
         VFS.close(): Set `instance` to `null` after closing it; #163.
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index bc2b1f1..1361094 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -75,6 +75,10 @@
               <th>Java Version</th>
             </tr>
             <tr>
+              <td>2.9.0</td>
+              <td>8</td>
+            </tr>
+            <tr>
               <td>2.8.0</td>
               <td>8</td>
             </tr>