jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: svn commit: r1309458 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Date Thu, 05 Apr 2012 08:48:48 GMT

>>That's what I was wondering, is a nodeExists() call followed by
>> getNodes() better than a getNodes() call by itself? Especially if we
>> assume potential network overhead for both calls...
>That pattern pops up all over again. We should probably not use
>exceptions for signalling missing values but use null instead and use
>exceptions for exceptional cases.

I agree. What about

(a) getNodes() can return null, like java.util.Map.get(), or
(b) getNodesOrNull() is added, and getNodes would still throw an exception.

I think the pattern "if nodeExists then getNodes" should be avoided also
because the node might have been deleted just after calling nodeExists,
depending on the underlying storage.


View raw message