jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1421891 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java
Date Fri, 14 Dec 2012 14:27:46 GMT
Author: angela
Date: Fri Dec 14 14:27:45 2012
New Revision: 1421891

URL: http://svn.apache.org/viewvc?rev=1421891&view=rev
Log:
OAK-494 : Cleanup ReadOnlyNodeTypeManager 

- NodeTypeImpl#matches(String, String) compares 2 jcr names one of which is provided by the
JCR API caller.
   comparision with equals therefore isn't possible (expande names) -> comparing oak-names
instead

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java?rev=1421891&r1=1421890&r2=1421891&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java
Fri Dec 14 14:27:45 2012
@@ -498,9 +498,11 @@ class NodeTypeImpl implements NodeType {
         return true;
     }
 
-    private static boolean matches(String childNodeName, String name) {
+    private boolean matches(String childNodeName, String name) {
+        String oakChildName = node.getNameMapper().getOakName(childNodeName);
+        String oakName = node.getNameMapper().getOakName(name);
         // TODO need a better way to handle SNS
-        return childNodeName.startsWith(name);
+        return oakChildName != null && oakChildName.startsWith(oakName);
     }
 
 }



Mime
View raw message