Skip to content

Commit 8e4a382

Browse files
committed
Add JDK9 TCK, using adapters
1 parent 68e0713 commit 8e4a382

File tree

51 files changed

+2232
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2232
-206
lines changed

.java-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ subprojects {
4646
}
4747
}
4848

49-
if (name in ["reactive-streams", "reactive-streams-tck", "reactive-streams-examples", "reactive-streams-flow-bridge"]) {
49+
if (name in ["reactive-streams",
50+
"reactive-streams-tck",
51+
"reactive-streams-tck-flow",
52+
"reactive-streams-examples",
53+
"reactive-streams-flow-bridge"]) {
5054
apply plugin: "maven"
5155
apply plugin: "signing"
5256

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static <T> Flow.Publisher<T> toFlow(
6464
}
6565
return new FlowPublisherFromReactive<T>(reactiveStreamsPublisher);
6666
}
67-
67+
6868
/**
6969
* Converts a Flow Processor into a Reactive Streams Processor.
7070
* @param <T> the input value type
@@ -117,7 +117,7 @@ public static <T, U> Flow.Processor<T, U> toFlow(
117117
* @param reactiveStreamsSubscriber the Reactive Streams Subscriber instance to convert
118118
* @return the equivalent Flow Subscriber
119119
*/
120-
public static <T> Flow.Subscriber<T> toFlowSubscriber(org.reactivestreams.Subscriber<T> reactiveStreamsSubscriber) {
120+
public static <T> Flow.Subscriber<T> toFlow(org.reactivestreams.Subscriber<T> reactiveStreamsSubscriber) {
121121
if (reactiveStreamsSubscriber == null) {
122122
throw new NullPointerException("reactiveStreamsSubscriber");
123123
}
@@ -130,7 +130,7 @@ public static <T> Flow.Subscriber<T> toFlowSubscriber(org.reactivestreams.Subscr
130130
* @param flowSubscriber the Flow Subscriber instance to convert
131131
* @return the equivalent Reactive Streams Subscriber
132132
*/
133-
public static <T> org.reactivestreams.Subscriber<T> toReactiveStreamsSubscriber(Flow.Subscriber<T> flowSubscriber) {
133+
public static <T> org.reactivestreams.Subscriber<T> toReactiveStreams(Flow.Subscriber<T> flowSubscriber) {
134134
if (flowSubscriber == null) {
135135
throw new NullPointerException("flowSubscriber");
136136
}
@@ -142,7 +142,7 @@ public static <T> org.reactivestreams.Subscriber<T> toReactiveStreamsSubscriber(
142142
*/
143143
static final class FlowToReactiveSubscription implements Flow.Subscription {
144144
private final org.reactivestreams.Subscription reactiveStreams;
145-
145+
146146
public FlowToReactiveSubscription(org.reactivestreams.Subscription reactive) {
147147
this.reactiveStreams = reactive;
148148
}
@@ -156,15 +156,15 @@ public void request(long n) {
156156
public void cancel() {
157157
reactiveStreams.cancel();
158158
}
159-
159+
160160
}
161-
161+
162162
/**
163163
* Wraps a Flow Subscription and converts the calls to a Reactive Streams Subscription.
164164
*/
165165
static final class ReactiveToFlowSubscription implements org.reactivestreams.Subscription {
166166
private final Flow.Subscription flow;
167-
167+
168168
public ReactiveToFlowSubscription(Flow.Subscription flow) {
169169
this.flow = flow;
170170
}
@@ -178,18 +178,18 @@ public void request(long n) {
178178
public void cancel() {
179179
flow.cancel();
180180
}
181-
182-
181+
182+
183183
}
184-
184+
185185
/**
186186
* Wraps a Reactive Streams Subscriber and forwards methods of the Flow Subscriber to it.
187187
* @param <T> the element type
188188
*/
189-
static final class FlowToReactiveSubscriber<T>
189+
static final class FlowToReactiveSubscriber<T>
190190
implements Flow.Subscriber<T> {
191191
private final org.reactivestreams.Subscriber<? super T> reactiveStreams;
192-
192+
193193
public FlowToReactiveSubscriber(org.reactivestreams.Subscriber<? super T> reactive) {
194194
this.reactiveStreams = reactive;
195195
}
@@ -213,17 +213,17 @@ public void onError(Throwable throwable) {
213213
public void onComplete() {
214214
reactiveStreams.onComplete();
215215
}
216-
216+
217217
}
218218

219219
/**
220220
* Wraps a Reactive Streams Subscriber and forwards methods of the Flow Subscriber to it.
221221
* @param <T> the element type
222222
*/
223-
static final class ReactiveToFlowSubscriber<T>
223+
static final class ReactiveToFlowSubscriber<T>
224224
implements org.reactivestreams.Subscriber<T> {
225225
private final Flow.Subscriber<? super T> flow;
226-
226+
227227
public ReactiveToFlowSubscriber(Flow.Subscriber<? super T> flow) {
228228
this.flow = flow;
229229
}
@@ -247,9 +247,9 @@ public void onError(Throwable throwable) {
247247
public void onComplete() {
248248
flow.onComplete();
249249
}
250-
250+
251251
}
252-
252+
253253
/**
254254
* Wraps a Flow Processor and forwards methods of the Reactive Streams Processor to it.
255255
* @param <T> the input type
@@ -258,7 +258,7 @@ public void onComplete() {
258258
static final class ReactiveToFlowProcessor<T, U>
259259
implements org.reactivestreams.Processor<T, U> {
260260
final Flow.Processor<? super T, ? extends U> flow;
261-
261+
262262
public ReactiveToFlowProcessor(Flow.Processor<? super T, ? extends U> flow) {
263263
this.flow = flow;
264264
}
@@ -292,7 +292,7 @@ public void subscribe(org.reactivestreams.Subscriber<? super U> s) {
292292
flow.subscribe(new FlowToReactiveSubscriber<U>(s));
293293
}
294294
}
295-
295+
296296
/**
297297
* Wraps a Reactive Streams Processor and forwards methods of the Flow Processor to it.
298298
* @param <T> the input type
@@ -301,7 +301,7 @@ public void subscribe(org.reactivestreams.Subscriber<? super U> s) {
301301
static final class FlowToReactiveProcessor<T, U>
302302
implements Flow.Processor<T, U> {
303303
final org.reactivestreams.Processor<? super T, ? extends U> reactiveStreams;
304-
304+
305305
public FlowToReactiveProcessor(org.reactivestreams.Processor<? super T, ? extends U> reactive) {
306306
this.reactiveStreams = reactive;
307307
}
@@ -380,4 +380,4 @@ public void subscribe(Flow.Subscriber<? super T> flow) {
380380
}
381381
}
382382

383-
}
383+
}

0 commit comments

Comments
 (0)