You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2015/01/19 11:44:35 UTC
[jira] [Commented] (OAK-2413) Clarify Editor.childNodeChanged()
[ https://issues.apache.org/jira/browse/OAK-2413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14282376#comment-14282376 ]
Michael Dürig commented on OAK-2413:
------------------------------------
I think the intended contract is the same as for {{NodeStateDiff}}: "Called for all child nodes that *may* contain changes" (my emphasis). We should make this explicit in the Javadoc and fix the affected implementations. Otherwise those similar APIs would be slightly off in a strange way. More importantly only calling {{childNodeChange()}} when there are actual changes means the implementation would need to eagerly check for those potentially duplicating work the consumer of the callback would need to do anyway.
> Clarify Editor.childNodeChanged()
> ---------------------------------
>
> Key: OAK-2413
> URL: https://issues.apache.org/jira/browse/OAK-2413
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Marcel Reutegger
> Priority: Minor
>
> The current contract for {{Editor.childNodeChanged()}} does not specify if this method may also be called when the child node did not actually change. The method {{NodeStateDiff.childNodeChanged()}} explicitly states that there may be such calls. Looking at the implementation connecting the two classes, {{EditorDiff.childNodeChange()}} simply calls the editor without checking whether the child node did in fact change.
> I think we either have to change the {{EditorDiff}} or update the contract for the Editor and adjust implementations. E.g. right now, PrivilegeValidator (implements Editor), assumes a call to {{childNodeChange()}} indeed means the child node changed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)