jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1151520 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java
Date Wed, 27 Jul 2011 16:03:56 GMT
Author: stefan
Date: Wed Jul 27 16:03:55 2011
New Revision: 1151520

URL: http://svn.apache.org/viewvc?rev=1151520&view=rev
Log:
minor improvements (WIP)...

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java?rev=1151520&r1=1151519&r2=1151520&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java
Wed Jul 27 16:03:55 2011
@@ -31,6 +31,8 @@ public class PathUtils {
      */
     private static final boolean SKIP_VALIDATION = Boolean.getBoolean(PathUtils.class.getName()
+ ".SKIP_VALIDATION");
 
+    private static final String[] EMPTY_ARRAY = new String[0];
+
     private PathUtils() {
         // utility class
     }
@@ -142,10 +144,10 @@ public class PathUtils {
         assertValid(path);
 
         if (path.length() == 0) {
-            return new String[0];
+            return EMPTY_ARRAY;
         } else if (path.startsWith("/")) {
             if (path.length() == 1) {
-                return new String[0];
+                return EMPTY_ARRAY;
             }
             path = path.substring(1);
         }



Mime
View raw message