jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r820655 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeMixinUtil.java
Date Thu, 01 Oct 2009 13:45:22 GMT
Author: mduerig
Date: Thu Oct  1 13:45:22 2009
New Revision: 820655

URL: http://svn.apache.org/viewvc?rev=820655&view=rev
Log:
JCR-2337: TCK: NodeMixinUtil should exclude for mix:shareable

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeMixinUtil.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeMixinUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeMixinUtil.java?rev=820655&r1=820654&r2=820655&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeMixinUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeMixinUtil.java
Thu Oct  1 13:45:22 2009
@@ -16,14 +16,17 @@
  */
 package org.apache.jackrabbit.test.api;
 
+import java.util.Arrays;
+import java.util.List;
+
+import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.Node;
-import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.NodeTypeIterator;
 import javax.jcr.nodetype.NodeType;
-import java.util.List;
-import java.util.Arrays;
+import javax.jcr.nodetype.NodeTypeIterator;
+import javax.jcr.nodetype.NodeTypeManager;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
 
 /**
  * Utility class to locate mixins in the NodeTyeManager.
@@ -40,9 +43,12 @@
         NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
         NodeTypeIterator mixins = manager.getMixinNodeTypes();
 
+        // Skip mix:shareable since not supported by removeMixin
+        String mixShareable = session.getNamespacePrefix(AbstractJCRTest.NS_MIX_URI) + ":shareable";
+
         while (mixins.hasNext()) {
             String name = mixins.nextNodeType().getName();
-            if (node.canAddMixin(name)) {
+            if (node.canAddMixin(name) && !mixShareable.equals(name)) {
                 return name;
             }
         }



Mime
View raw message