jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r783326 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/AbstractNodeTypeManagementTest.java
Date Wed, 10 Jun 2009 12:45:33 GMT
Author: angela
Date: Wed Jun 10 12:45:32 2009
New Revision: 783326

URL: http://svn.apache.org/viewvc?rev=783326&view=rev
Log:
JCR-1104: JSR 283 support

- remove redundant casts now that 283 api is present

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/AbstractNodeTypeManagementTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/AbstractNodeTypeManagementTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/AbstractNodeTypeManagementTest.java?rev=783326&r1=783325&r2=783326&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/AbstractNodeTypeManagementTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/AbstractNodeTypeManagementTest.java
Wed Jun 10 12:45:32 2009
@@ -99,16 +99,15 @@
         Node child = (Node) superuser.getItem(childNode.getPath());
         String ntName = child.getPrimaryNodeType().getName();
 
-        // TODO: remove casts once jsr 283 is released.        
         String changedNtName = "nt:folder";
-        ((javax.jcr.Node) child).setPrimaryType(changedNtName);
+        child.setPrimaryType(changedNtName);
         child.save();
 
         try {
             checkReadOnly(childNode.getPath());
 
             try {
-                ((javax.jcr.Node) childNode).setPrimaryType(ntName);
+                childNode.setPrimaryType(ntName);
                 childNode.save();
                 fail("TestSession does not have sufficient privileges to change the primary
type.");
             } catch (AccessDeniedException e) {
@@ -122,7 +121,7 @@
              */
             modifyPrivileges(childNode.getPath(), Privilege.JCR_NODE_TYPE_MANAGEMENT, true);
             try {
-                ((javax.jcr.Node) childNode).setPrimaryType(ntName);
+                childNode.setPrimaryType(ntName);
                 childNode.save();
                 fail("TestSession does not have sufficient privileges to change the primary
type.");
             } catch (AccessDeniedException e) {
@@ -132,12 +131,12 @@
 
             // with complete write permission the call must succeed.
             modifyPrivileges(childNode.getPath(), Privilege.JCR_MODIFY_PROPERTIES, true);
-            ((javax.jcr.Node) childNode).setPrimaryType(ntName);
+            childNode.setPrimaryType(ntName);
             childNode.save();
 
         } finally {
             if (!ntName.equals(child.getPrimaryNodeType().getName())) {
-                ((javax.jcr.Node) child).setPrimaryType(ntName);
+                child.setPrimaryType(ntName);
                 child.save();
             }
         }



Mime
View raw message