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

Marcel Reutegger commented on OAK-395:
--------------------------------------

I prefer Chetans second suggestion and return a property instance in this case.

The JavaDoc (and the spec AFAICS) of the method does not talk about the case 
when the property does not exist. The method also does not mention 
PathNotFoundException, so I'm not sure that's the right thing to do also in 
light of compatibility with Jackrabbit 2.x.
                
> Inconsistency in Node#setProperty in case of null value
> -------------------------------------------------------
>
>                 Key: OAK-395
>                 URL: https://issues.apache.org/jira/browse/OAK-395
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: angela
>            Assignee: angela
>
> Setting a null value to a single valued property will result
> in 'null' being returned while executing the same on a multivalued
> property will return the removed property.
> jr2 returned the removed property in both cases as far as i 
> remember and i would suggest that we don't change that behavior. in
> particular since the specification IMO doesn't allow to return
> null-values for these methods.

--
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

Reply via email to