hi,
I came across this funny looking bit in the AbstractNodeState class [0]:
public Iterable<String> getChildNodeNames() {
return Iterables.transform(
getChildNodeEntries(),
and
public Iterable<? extends ChildNodeEntry> getChildNodeEntries() {
return Iterables.transform(
getChildNodeNames(),
So it seems that each one references the other :)
I checked and each class that extends AbstractNodeState implements one or
both methods, this code can be quite dangerous.
I'm proposing to remove one implementation from this class. I'd remove
#getChildNodeEntries as it is already implemented by all existing classes
and it is intimately tied to the storage mechanism anyway.
best,
alex
[0]
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/AbstractNodeState.java?view=markup#l82
|