Skip to content

Commit 5278124

Browse files
igor-suhorukovakarnokd
authored andcommitted
Replace indexed loop with for-each java5 syntax (#6335)
* Replace indexed loop with for-each java5 syntax * Restore code as per @akarnokd code review * Keep empty lines as per @akarnokd code review
1 parent 3481ed1 commit 5278124

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/io/reactivex/internal/operators/parallel/ParallelJoin.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,13 @@ public void cancel() {
110110
}
111111

112112
void cancelAll() {
113-
for (int i = 0; i < subscribers.length; i++) {
114-
JoinInnerSubscriber<T> s = subscribers[i];
113+
for (JoinInnerSubscriber<T> s : subscribers) {
115114
s.cancel();
116115
}
117116
}
118117

119118
void cleanup() {
120-
for (int i = 0; i < subscribers.length; i++) {
121-
JoinInnerSubscriber<T> s = subscribers[i];
119+
for (JoinInnerSubscriber<T> s : subscribers) {
122120
s.queue = null;
123121
}
124122
}

0 commit comments

Comments
 (0)