[
https://issues.apache.org/jira/browse/OAK-452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499210#comment-13499210
]
Michael Dürig commented on OAK-452:
-----------------------------------
The suggested changes are on a branch of my github clone:
https://github.com/mduerig/jackrabbit-oak/commits/nodebuilder-cleanup.
In a nutshell, I:
* replaced the recurring one liners with private helper methods named after
what actually is going on,
* simplified the {{child()}} method by factoring out the commonalities with the
{{write()}} method,
* added a separate method for checking class invariants.
Most of the commits on my branch are quite simple changes, so it shouldn't be
too difficult to follow my reasoning.
[~jukkaz], could you have a look?
> MemoryNodeBuilder improvements
> ------------------------------
>
> Key: OAK-452
> URL: https://issues.apache.org/jira/browse/OAK-452
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Michael Dürig
>
> As mentioned on OAK-447, OAK-448 the introduction of the reset method in
> {{NodeBuilder}} lead to the breakdown of some of the class invariants that
> held earlier. See also the FIXME tags in MemoryNodeBuilder. In addition the
> code should be simplified where possible. Currently it is very hard to track
> what's going on just by reading the code, Javadoc and test cases.
--
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