jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Comment regarding TreeImpl#remove
Date Tue, 24 Jul 2012 11:30:44 GMT
hi michael

the implementation of Tree#remove starts with the following line:

         if (!isRoot() && parent.hasChild(name)) {

and it seems to me that testing for the parent containing the
Tree that i am having at hand is superfluous. is that the
leftover of a refactoring or could it really occur that in this
situation parent.hasChild returns false? if the latter was
true, i think this line deserves a little comment explaining
to the poor reader what are the circumstances of that behaviour.
maybe we would even need some log output for that special case.

what do you think?

View raw message