Skip to content

Commit 0eeee27

Browse files
committed
Merge pull request #2938 from jacek-marchwicki/combine-last-overflow
Fixed Observable.combineLatest overflow bug on Android
2 parents b3384e0 + 5d23e29 commit 0eeee27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public final class OnSubscribeCombineLatest<T, R> implements OnSubscribe<R> {
4949
public OnSubscribeCombineLatest(List<? extends Observable<? extends T>> sources, FuncN<? extends R> combinator) {
5050
this.sources = sources;
5151
this.combinator = combinator;
52-
if (sources.size() > 128) {
53-
// For design simplicity this is limited to 128. If more are really needed we'll need to adjust
54-
// the design of how RxRingBuffer is used in the implementation below.
55-
throw new IllegalArgumentException("More than 128 sources to combineLatest is not supported.");
52+
if (sources.size() > RxRingBuffer.SIZE) {
53+
// For design simplicity this is limited to RxRingBuffer.SIZE. If more are really needed we'll need to
54+
// adjust the design of how RxRingBuffer is used in the implementation below.
55+
throw new IllegalArgumentException("More than RxRingBuffer.SIZE sources to combineLatest is not supported.");
5656
}
5757
}
5858

0 commit comments

Comments
 (0)