jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1133753 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtil.java
Date Thu, 09 Jun 2011 09:42:56 GMT
Author: thomasm
Date: Thu Jun  9 09:42:55 2011
New Revision: 1133753

URL: http://svn.apache.org/viewvc?rev=1133753&view=rev
Log:
Support path ending with /

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

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtil.java?rev=1133753&r1=1133752&r2=1133753&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtil.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtil.java
Thu Jun  9 09:42:55 2011
@@ -41,6 +41,9 @@ public class PathUtil {
     }
 
     public static String getName(String path) {
+        if (path.endsWith("/")) {
+            path = path.substring(0, path.length() - 1);
+        }
         int pos = path.lastIndexOf('/');
         if (pos != -1) {
             return path.substring(pos + 1);



Mime
View raw message