From 31bcdead163d8c394d20d6e2eb6b5af6c4e96cb7 Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Thu, 19 Dec 2024 14:49:04 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Kezhu Wang --- .../curator/framework/imps/GetChildrenBuilderImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/GetChildrenBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/GetChildrenBuilderImpl.java index ddf975cab..8789686a1 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/GetChildrenBuilderImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/GetChildrenBuilderImpl.java @@ -165,14 +165,11 @@ public void performBackgroundOperation(final OperationAndData operationA @Override public void processResult(int rc, String path, Object o, List strings, Stat stat) { watching.commitWatcher(rc, false); - if (strings == null) { - strings = Lists.newArrayList(); - } trace.setReturnCode(rc) .setPath(path) .setWithWatcher(watching.hasWatcher()) .setStat(stat) - .setResponseChildrenCount(strings.size()) + .setResponseChildrenCount(strings != null ? strings.size() : 0) .commit(); CuratorEventImpl event = new CuratorEventImpl( client,