You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Gilles Knobloch (JIRA)" <ji...@apache.org> on 2013/08/29 22:07:52 UTC

[jira] [Comment Edited] (SLING-2780) Make ResourceMetadata read-only when delivered to client code

    [ https://issues.apache.org/jira/browse/SLING-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13747463#comment-13747463 ] 

Gilles Knobloch edited comment on SLING-2780 at 8/29/13 8:07 PM:
-----------------------------------------------------------------

[~cziegeler]: broke prototype of SLING-2986 as well, but solution proposed by [~alexander.klimetschek] is valid.
Is this publicly documented somewhere? I share the same concerns, might break consumers' own resource providers.
                
      was (Author: gknob):
    Broke prototype of SLING-2986 as well
                  
> Make ResourceMetadata read-only when delivered to client code
> -------------------------------------------------------------
>
>                 Key: SLING-2780
>                 URL: https://issues.apache.org/jira/browse/SLING-2780
>             Project: Sling
>          Issue Type: New Feature
>          Components: API, ResourceResolver
>    Affects Versions: API 2.3.0, Resource Resolver 1.0.4
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: API 2.4.0, Resource Resolver 1.0.6
>
>
> As recently discussed in the mailing list, ResourceMetadata is an object which provides additional metadata information about a resource but is not intended to be changed by client code.
> As ResourceMetadata extends from (Hash)Map it is read/write by default and might potentially be changed by client code.
> We should update the API docs that this object is read-only and also enforce it in our implementation.
> It seems so far no one is changing the ResourceMetadata after it has left the resource resolver, therefore we can make it read-only after it is returned by the resource resolver.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira