incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r726513 - /incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
Date Sun, 14 Dec 2008 18:39:42 GMT
Author: fmeschbe
Date: Sun Dec 14 10:39:41 2008
New Revision: 726513

URL: http://svn.apache.org/viewvc?rev=726513&view=rev
Log:
SLING-772 Catch AccessControlException to be able to return null if permission
to set properties is denied.

Modified:
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java?rev=726513&r1=726512&r2=726513&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
(original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
Sun Dec 14 10:39:41 2008
@@ -26,6 +26,7 @@
 
 import java.io.InputStream;
 import java.net.URL;
+import java.security.AccessControlException;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
@@ -88,9 +89,10 @@
             try {
                 getNode().getSession().checkPermission(getNode().getPath(), "set_property");
                 return (Type) new JcrModifiablePropertyMap(getNode());
+            } catch (AccessControlException ace) {
+                // the user has no write permission, cannot adapt
             } catch (RepositoryException e) {
-                // either the user has no write permission or a more
-                // sever exception occured - in both cases we don't return the map
+                // some other problem, cannot adapt
             }
         }
 



Mime
View raw message