Skip to content

Commit 4a2287c

Browse files
committed
fix formatting
1 parent a1f6475 commit 4a2287c

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

tck/src/test/java/org/reactivestreams/tck/BrokenExampleWhiteboxTest.java

+30-30
Original file line numberDiff line numberDiff line change
@@ -54,43 +54,43 @@ public BrokenExampleWhiteboxTest() {
5454
}
5555

5656
public class MySubscriber<T> implements Subscriber<T> {
57-
private volatile Subscription subscription;
57+
private volatile Subscription subscription;
5858

5959
public boolean triggerDemand(final long n) {
60-
final Subscription s = subscription;
61-
if (s == null) return false;
62-
else {
63-
try {
64-
s.request(n);
65-
} catch(final Throwable t) {
66-
// Subscription.request is not allowed to throw according to rule 3.16
67-
(new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err);
68-
return false;
69-
}
70-
return true;
60+
final Subscription s = subscription;
61+
if (s == null) return false;
62+
else {
63+
try {
64+
s.request(n);
65+
} catch (final Throwable t) {
66+
// Subscription.request is not allowed to throw according to rule 3.16
67+
(new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err);
68+
return false;
7169
}
70+
return true;
7271
}
72+
}
7373

74-
@Override
75-
public void onSubscribe(Subscription subscription) {
76-
this.subscription = subscription;
77-
subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
78-
}
74+
@Override
75+
public void onSubscribe(Subscription subscription) {
76+
this.subscription = subscription;
77+
subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
78+
}
7979

80-
@Override
81-
public void onNext(T item) {
82-
System.out.println("Got : " + item);
83-
subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
84-
}
80+
@Override
81+
public void onNext(T item) {
82+
System.out.println("Got : " + item);
83+
subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
84+
}
8585

86-
@Override
87-
public void onError(Throwable t) {
88-
t.printStackTrace();
89-
}
86+
@Override
87+
public void onError(Throwable t) {
88+
t.printStackTrace();
89+
}
9090

91-
@Override
92-
public void onComplete() {
93-
System.out.println("Done");
94-
}
91+
@Override
92+
public void onComplete() {
93+
System.out.println("Done");
9594
}
95+
}
9696
}

0 commit comments

Comments
 (0)