jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1384009 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeImpl.java
Date Wed, 12 Sep 2012 16:10:36 GMT
Author: mduerig
Date: Wed Sep 12 16:10:36 2012
New Revision: 1384009

URL: http://svn.apache.org/viewvc?rev=1384009&view=rev
Log:
OAK-66: JCR Node Type Management
factor out common code

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeImpl.java?rev=1384009&r1=1384008&r2=1384009&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeImpl.java
Wed Sep 12 16:10:36 2012
@@ -27,7 +27,6 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Queue;
 import java.util.Set;
-import java.util.UUID;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
@@ -43,6 +42,7 @@ import javax.jcr.nodetype.PropertyDefini
 import javax.security.auth.Subject;
 
 import org.apache.jackrabbit.commons.iterator.NodeTypeIteratorAdapter;
+import org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager;
 import org.apache.jackrabbit.oak.plugins.type.constraint.Constraints;
 import org.apache.jackrabbit.oak.spi.security.principal.AdminPrincipal;
 import org.apache.jackrabbit.oak.util.NodeUtil;
@@ -337,8 +337,7 @@ class NodeTypeImpl implements NodeType {
                     return true;
                 case PropertyType.REFERENCE:
                 case PropertyType.WEAKREFERENCE:
-                    UUID.fromString(value.getString());
-                    return true;
+                    return IdentifierManager.isValidUUID(value.getString());
                 case PropertyType.URI:
                     new URI(value.getString());
                     return true;
@@ -358,9 +357,6 @@ class NodeTypeImpl implements NodeType {
         catch (URISyntaxException e) {
             return false;
         }
-        catch (IllegalArgumentException e) {
-            return false;
-        }
     }
 
     private static boolean meetsTypeConstraints(Value[] values, int requiredType) {



Mime
View raw message