jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1390577 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Date Wed, 26 Sep 2012 15:49:00 GMT
Author: angela
Date: Wed Sep 26 15:48:59 2012
New Revision: 1390577

URL: http://svn.apache.org/viewvc?rev=1390577&view=rev
Log:
remove PropertyLocation#canWrite as write permission is checked and enforced upon commit

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1390577&r1=1390576&r2=1390577&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Wed Sep 26 15:48:59 2012
@@ -608,13 +608,8 @@ public class TreeImpl implements Tree, P
          * @return  {@code true} on success false otherwise
          */
         public boolean setValue(CoreValue value) {
-            if (canWrite()) {
-                parent.tree.setProperty(property.getName(), value);
-                return true;
-            }
-            else {
-                return false;
-            }
+            parent.tree.setProperty(property.getName(), value);
+            return true;
         }
 
         /**
@@ -623,13 +618,8 @@ public class TreeImpl implements Tree, P
          * @return  {@code true} on success false otherwise
          */
         public boolean setValues(List<CoreValue> values) {
-            if (canWrite()) {
-                parent.tree.setProperty(property.getName(), values);
-                return true;
-            }
-            else {
-                return false;
-            }
+            parent.tree.setProperty(property.getName(), values);
+            return true;
         }
 
         /**
@@ -637,23 +627,13 @@ public class TreeImpl implements Tree, P
          * @return  {@code true} on success false otherwise
          */
         public boolean remove() {
-            if (canWrite()) {
-                parent.tree.removeProperty(property.getName());
+            parent.tree.removeProperty(property.getName());
             return true;
-            }
-            else {
-                return false;
-            }
         }
 
         private boolean canRead() {
             return root.getPermissions().canRead(getPath(), true);
         }
-
-        private boolean canWrite() {
-            // TODO implement canWrite
-            return canRead();
-        }
     }
 
     public static class NullLocation implements TreeLocation {



Mime
View raw message