jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1144328 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/PathUtils.java
Date Fri, 08 Jul 2011 14:24:44 GMT
Author: mduerig
Date: Fri Jul  8 14:24:44 2011
New Revision: 1144328

URL: http://svn.apache.org/viewvc?rev=1144328&view=rev
Log:
- path validation

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=1144328&r1=1144327&r2=1144328&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
Fri Jul  8 14:24:44 2011
@@ -22,6 +22,11 @@ import java.util.ArrayList;
  * Utility methods to parse a JCR path.
  */
 public class PathUtils {
+    /**
+     * Controls whether paths passed into methods of this class are validated or not.
+     * todo: decide whether and how to make this available through configuration 
+     */
+    private static final boolean VALIDATE_PATHS = true;
 
     private PathUtils() {
         // utility class
@@ -310,10 +315,8 @@ public class PathUtils {
     //------------------------------------------< private >---
 
     public static void assertValid(String path) {
-        try {
+        if (VALIDATE_PATHS) {
             validate(path);
-        } catch (IllegalArgumentException e) {
-            assert false;
         }
     }
 



Mime
View raw message