kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: fix generics in Windows.segments and Windows.until
Date Tue, 05 Jul 2016 18:38:26 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 00d5becba -> 9d1c2daa5


MINOR: fix generics in Windows.segments and Windows.until

`Windows.segments(...)` and `Windows.until(...)` currently aren't returning the `Window` with
its type param `W`. This causes the generic type to be lost and therefore methods using this
can't infer the correct return types.

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Matthias J. Sax, Guozhang Wang

Closes #1587 from dguy/windows-generics

(cherry picked from commit dca263b4e00b00983a4b9f74517b25b01492a4c6)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/9d1c2daa
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/9d1c2daa
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/9d1c2daa

Branch: refs/heads/0.10.0
Commit: 9d1c2daa5c416f614f3c9fcdc1641cef265f8efa
Parents: 00d5bec
Author: Damian Guy <damian.guy@gmail.com>
Authored: Tue Jul 5 11:38:15 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Jul 5 11:38:23 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/kafka/streams/kstream/Windows.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/9d1c2daa/streams/src/main/java/org/apache/kafka/streams/kstream/Windows.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/Windows.java b/streams/src/main/java/org/apache/kafka/streams/kstream/Windows.java
index c64a80f..164e584 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/Windows.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/Windows.java
@@ -54,7 +54,7 @@ public abstract class Windows<W extends Window> {
      *
      * @return  itself
      */
-    public Windows until(long durationMs) {
+    public Windows<W> until(long durationMs) {
         this.maintainDurationMs = durationMs;
 
         return this;
@@ -66,7 +66,7 @@ public abstract class Windows<W extends Window> {
      *
      * @return  itself
      */
-    protected Windows segments(int segments) {
+    protected Windows<W> segments(int segments) {
         this.segments = segments;
 
         return this;


Mime
View raw message