[
https://issues.apache.org/jira/browse/OAK-799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting resolved OAK-799.
-------------------------------
Resolution: Fixed
Fix Version/s: 0.7
Done in http://svn.apache.org/r1477505.
> Fail-fast for content diffs
> ---------------------------
>
> Key: OAK-799
> URL: https://issues.apache.org/jira/browse/OAK-799
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 0.7
>
>
> Currently the only way for a {{NodeStateDiff}} implementation to stop a
> {{compareAgainstBaseState()}} operation is to throw an undeclared exception.
> This is troublesome as using exceptions for flow control is bad practice and
> as in some cases short-cutting the comparison operation can notably improve
> performance by avoiding unnecessary work.
> Thus I suggest that we add a boolean return value to the {{NodeStateDiff}}
> methods. By returning {{false}}, an implementation could signal the calling
> {{compareAgainstBaseState()}} method to stop the comparison. The return value
> should also be returned by the {{compareAgainstBaseState()}} method so that
> the caller can tell whether the comparison was stopped before completion.
--
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