jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1153104 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java
Date Tue, 02 Aug 2011 12:00:18 GMT
Author: thomasm
Date: Tue Aug  2 12:00:17 2011
New Revision: 1153104

URL: http://svn.apache.org/viewvc?rev=1153104&view=rev
Log:
Error message, javadocs.

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=1153104&r1=1153103&r2=1153104&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
Tue Aug  2 12:00:17 2011
@@ -178,7 +178,7 @@ public class PathUtils {
         assertValid(relativePath);
 
         if (relativePath.startsWith("/")) {
-            throw new IllegalArgumentException("can't append absolute path");
+            throw new IllegalArgumentException("Cannot append absolute path " + relativePath);
         } else if (relativePath.length() == 0) {
             return parentPath;
         }
@@ -198,9 +198,9 @@ public class PathUtils {
      * <code>relativize(parentPath, concat(parentPath, path)) == paths</code>
      * holds.
      *
-     * @param parentPath  parent pth
-     * @param path        path to relativize
-     * @return  relativized path
+     * @param parentPath parent pth
+     * @param path path to relativize
+     * @return relativized path
      */
     public static String relativize(String parentPath, String path) {
         assertValid(parentPath);
@@ -263,14 +263,14 @@ public class PathUtils {
         if (path.length() == 0 || "/".equals(path)) {
             return;
         } else if (path.endsWith("/")) {
-            throw new IllegalArgumentException(path + " (ends with '/')");
+            throw new IllegalArgumentException("Path may not end with '/': " + path);
         }
         char last = 0;
         for (int index = 0, len = path.length(); index < len; index++) {
             char c = path.charAt(index);
             if (c == '/') {
                 if (last == '/') {
-                    throw new IllegalArgumentException(path + " (contains '//')");
+                    throw new IllegalArgumentException("Path may not contains '//': " + path);
                 }
             }
             last = c;



Mime
View raw message