Skip to content

Commit cf24658

Browse files
committed
Added jsr166 backport reference, fixed cast bugs
1 parent 1620f34 commit cf24658

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

flow-bridge/build.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
description = "reactive-streams-flow-bridge"
2+
3+
repositories {
4+
maven { url 'http://repo.spring.io/libs-snapshot' }
5+
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
6+
}
7+
28
dependencies {
39
compile project(':reactive-streams')
10+
compile "io.projectreactor:jsr166:1.0.0.BUILD-SNAPSHOT"
411
}

flow-bridge/src/main/java/org/reactivestreams/ReactiveFlowBridge.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static <T> Flow.Publisher<T> toFlow(
4343
org.reactivestreams.Publisher<? extends T> reactivePublisher
4444
) {
4545
Objects.requireNonNull(reactivePublisher, "reactivePublisher");
46-
if (reactivePublisher instanceof org.reactivestreams.Publisher) {
46+
if (reactivePublisher instanceof Flow.Publisher) {
4747
return (Flow.Publisher<T>)reactivePublisher;
4848
}
4949
if (reactivePublisher instanceof ReactivePublisherFromFlow) {
@@ -85,7 +85,7 @@ public static <T, U> Flow.Processor<T, U> toFlow(
8585
org.reactivestreams.Processor<? super T, ? extends U> reactiveProcessor
8686
) {
8787
Objects.requireNonNull(reactiveProcessor, "reactiveProcessor");
88-
if (reactiveProcessor instanceof org.reactivestreams.Processor) {
88+
if (reactiveProcessor instanceof Flow.Processor) {
8989
return (Flow.Processor<T, U>)reactiveProcessor;
9090
}
9191
if (reactiveProcessor instanceof ReactiveToFlowProcessor) {

0 commit comments

Comments
 (0)