nfsantos commented on code in PR #1704:
URL: https://github.com/apache/jackrabbit-oak/pull/1704#discussion_r1753176654


##########
oak-it/src/test/java/org/apache/jackrabbit/oak/composite/CompositeNodeStoreTest.java:
##########
@@ -652,12 +650,14 @@ public void duplicatedChildren() throws 
CommitFailedException {
         deepMountBuilder.child("new").setProperty("store", "deepMounted", 
Type.STRING);
         deepMountedStore.merge(deepMountBuilder, EmptyHook.INSTANCE, 
CommitInfo.EMPTY);
 
-        List<ChildNodeEntry> children = 
newArrayList(filter(store.getRoot().getChildNodeEntries(), 
compose(Predicates.equalTo("new"), GET_NAME::apply)));
+        List<ChildNodeEntry> children = 
newArrayList(filter(store.getRoot().getChildNodeEntries(),
+                x -> Objects.equals(x == null ? null : x.getName(), "new")));

Review Comment:
   I think in this case the right-hand side is always "new", so if x == null, 
it will be false. Anyway, not too important, no need to change anything, but 
the fact that we are arguing over this line of code is a good indication that 
it is confusing. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to