kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: MINOR: Optimize KTable-KTable join value getter supplier (#4458)
Date Mon, 29 Jan 2018 04:17:57 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b5da5f8  MINOR: Optimize KTable-KTable join value getter supplier (#4458)
b5da5f8 is described below

commit b5da5f8bec2b87c13f82d57be8e38a397c61366e
Author: Kamil SzymaƄski <kamil.szymanski.dev@gmail.com>
AuthorDate: Mon Jan 29 05:17:48 2018 +0100

    MINOR: Optimize KTable-KTable join value getter supplier (#4458)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>, Damian Guy <damian.guy@gmail.com>,
Matthias J. Sax <mjsax@apache.org>
---
 .../internals/KTableKTableAbstractJoinValueGetterSupplier.java   | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableKTableAbstractJoinValueGetterSupplier.java
b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableKTableAbstractJoinValueGetterSupplier.java
index be5a202..d36920a 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableKTableAbstractJoinValueGetterSupplier.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableKTableAbstractJoinValueGetterSupplier.java
@@ -17,6 +17,7 @@
 package org.apache.kafka.streams.kstream.internals;
 
 import java.util.ArrayList;
+import java.util.Collections;
 
 public abstract class KTableKTableAbstractJoinValueGetterSupplier<K, R, V1, V2> implements
KTableValueGetterSupplier<K, R> {
     final KTableValueGetterSupplier<K, V1> valueGetterSupplier1;
@@ -33,12 +34,8 @@ public abstract class KTableKTableAbstractJoinValueGetterSupplier<K,
R, V1, V2>
         final String[] storeNames1 = valueGetterSupplier1.storeNames();
         final String[] storeNames2 = valueGetterSupplier2.storeNames();
         final ArrayList<String> stores = new ArrayList<>(storeNames1.length +
storeNames2.length);
-        for (final String storeName : storeNames1) {
-            stores.add(storeName);
-        }
-        for (final String storeName : storeNames2) {
-            stores.add(storeName);
-        }
+        Collections.addAll(stores, storeNames1);
+        Collections.addAll(stores, storeNames2);
         return stores.toArray(new String[stores.size()]);
     }
 

-- 
To stop receiving notification emails like this one, please contact
guozhang@apache.org.

Mime
View raw message