Skip to content

Commit

Permalink
Assist the compiler with type inference.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasMikula committed Jun 3, 2014
1 parent ade3b67 commit cabf460
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion reactfx/src/main/java/org/reactfx/BiEventSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ default void push(Tuple2<A, B> t) {
}

default Subscription feedFrom2(BiEventStream<? extends A, ? extends B> source) {
return source.subscribe(this::push);
return source.subscribe((a, b) -> push(a, b));
}
}
2 changes: 1 addition & 1 deletion reactfx/src/main/java/org/reactfx/BiEventStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ default Subscription subscribe(Consumer<? super Tuple2<A, B>> subscriber) {
}

default Subscription feedTo2(BiEventSink<? super A, ? super B> sink) {
return subscribe(sink::push);
return subscribe((a, b) -> sink.push(a, b));
}

default BiEventStream<A, B> hook(
Expand Down
2 changes: 1 addition & 1 deletion reactfx/src/main/java/org/reactfx/TriEventSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ default void push(Tuple3<A, B, C> t) {
}

default Subscription feedFrom3(TriEventStream<? extends A, ? extends B, ? extends C> source) {
return source.subscribe(this::push);
return source.subscribe((a, b, c) -> push(a, b, c));
}
}
2 changes: 1 addition & 1 deletion reactfx/src/main/java/org/reactfx/TriEventStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ default Subscription subscribe(Consumer<? super Tuple3<A, B, C>> subscriber) {
}

default Subscription feedTo3(TriEventSink<? super A, ? super B, ? super C> sink) {
return subscribe(sink::push);
return subscribe((a, b, c) -> sink.push(a, b, c));
}

default TriEventStream<A, B, C> hook(
Expand Down

0 comments on commit cabf460

Please sign in to comment.