incubator-sling-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=726514&view=rev
Log:
SLING-772 Add logging for the caught exceptions, explaining why the PeristableValueMap
cannot be returned.

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=726514&r1=726513&r2=726514&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:42:36 2008
@@ -84,15 +84,22 @@
             return (Type) getURL(); // unchecked cast
         } else if (type == Map.class || type == ValueMap.class) {
             return (Type) new JcrPropertyMap(getNode()); // unchecked cast
-        } else if (type == PersistableValueMap.class ) {
+        } else if (type == PersistableValueMap.class) {
             // check write
             try {
-                getNode().getSession().checkPermission(getNode().getPath(), "set_property");
+                getNode().getSession().checkPermission(getNode().getPath(),
+                    "set_property");
                 return (Type) new JcrModifiablePropertyMap(getNode());
             } catch (AccessControlException ace) {
                 // the user has no write permission, cannot adapt
+                log.info(
+                    "adaptTo(PersistableValueMap): Cannot set properties on {}",
+                    this);
             } catch (RepositoryException e) {
                 // some other problem, cannot adapt
+                log.info(
+                    "adaptTo(PersistableValueMap): Unexpected problem for {}",
+                    this);
             }
         }
 



Mime
View raw message