You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/11/15 19:23:13 UTC

[GitHub] [ignite-3] tkalkirill commented on a change in pull request #445: IGNITE-15884 Make TableIndexConfigurationSchema polymorphic

tkalkirill commented on a change in pull request #445:
URL: https://github.com/apache/ignite-3/pull/445#discussion_r749616346



##########
File path: modules/configuration/src/main/java/org/apache/ignite/internal/configuration/util/ConfigurationNotificationsUtil.java
##########
@@ -662,69 +673,82 @@ public Void visitNamedListNode(String key, NamedListNode<?> newNamedList) {
      */
     private static Collection<DynamicConfiguration<InnerNode, ?>> mergeAnyConfigs(
             Collection<DynamicConfiguration<InnerNode, ?>> anyConfigs,
-            DynamicConfiguration<InnerNode, ?> anyConfig
+            @Nullable DynamicConfiguration<InnerNode, ?> anyConfig
     ) {
-        if (anyConfigs.isEmpty()) {
-            return List.of(anyConfig);
-        } else {
-            Collection<DynamicConfiguration<InnerNode, ?>> res = new ArrayList<>(anyConfigs.size() + 1);
-            
-            res.addAll(anyConfigs);
-            res.add(anyConfig);
-            
-            return res;
-        }
+        return Stream.concat(anyConfigs.stream(), Stream.of(anyConfig))

Review comment:
       I suggest not using streams here.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org