-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Varargs cause compiler warnings #359
Comments
The same problem also occurs with |
Unless someone shows me how to get rid of this warning without using
|
Like the zip operator? Sent from my iPhone On Sep 9, 2013, at 1:50 AM, samuelgruetter [email protected] wrote:
|
yes |
That issue with varargs is definitely one of the weaknesses of generics. How about if we had overloads for up to 9 arities, and then on that one have a 10th vararg for scenarios were people truly do want/need more? That way it would only affect someone using beyond 9 args? |
I don't quite get what you mean by "a 10th vararg for scenarios..." but I'd also be fine with overloads for up to 9 arguments, plus another overload which takes only 1 argument of type |
I meant something like this ... concat(T t1, T t2)
... etc ...
concat(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8)
concat(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9)
concat(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9, T... rest) I will start refactoring vararg method signature later today or tonight (US Pacific time) unless someone else is already doing it. If one of you already are tackling this please let me know here so we don't replicate effort. |
Closing as I have removed all varargs from Observable. |
#359 Varargs cause compiler warnings
ReactiveX#359 Varargs cause compiler warnings
ReactiveX#359 Varargs cause compiler warnings As part of this I also changed this: ```java public static <T> Observable<T> concat(Observable<Observable<? extends T>> observables) ``` to ```java public static <T> Observable<T> concat(Observable<Observable<T>> observables) ``` I documented the reasoning of this at ReactiveX#360 (comment)
ReactiveX#359 Varargs cause compiler warnings
ReactiveX#359 Varargs cause compiler warnings
ReactiveX#359 Varargs cause compiler warnings
Fix vararg issues reported in ReactiveX#359
ReactiveX#359 Varargs cause compiler warnings As part of this I also changed this: ```java public static <T> Observable<T> concat(Observable<Observable<? extends T>> observables) ``` to ```java public static <T> Observable<T> concat(Observable<Observable<T>> observables) ``` I documented the reasoning of this at ReactiveX#360 (comment)
ReactiveX#359 Varargs cause compiler warnings
ReactiveX#359 Varargs cause compiler warnings
ReactiveX#359 Varargs cause compiler warnings
Fix vararg issues reported in ReactiveX#359
The |
ReactiveX/RxJava#359 Varargs cause compiler warnings
ReactiveX/RxJava#359 Varargs cause compiler warnings
ReactiveX/RxJava#359 Varargs cause compiler warnings
ReactiveX/RxJava#359 Varargs cause compiler warnings
ReactiveX/RxJava#359 Varargs cause compiler warnings
ReactiveX/RxJava#359 Varargs cause compiler warnings
Fix vararg issues reported in ReactiveX/RxJava#359
ReactiveX/RxJava#359 Varargs cause compiler warnings
ReactiveX/RxJava#359 Varargs cause compiler warnings
Fix vararg issues reported in ReactiveX/RxJava#359
…. Added support for Maybe. * Upgrade RxJava2 version to 2.2.7 Recently RxJava folks inlined the SubscriptionHelper.isCancelled, so the method had to be inlined in our code as well. * Retry transformer for RxJava2 Completable type This type returns no values at all. It finishes either with onComplete or onError, so in order to properly count the successful calls without retry attempt we need to count onComplete as success. * RxJava2 support for retryOnResult * Stop using RxJava internal API in RetryTransformer + support for Maybe
I'm trying to use the
concat
operator, but I can't use it without getting a compiler warning. Here's my code:I get the warning "Type safety: A generic array of Observable<CovarianceTest.HorrorMovie> is created for a varargs parameter".
This problem was discussed on stackoverflow and this bug report explains why it's not going to be fixed.
The text was updated successfully, but these errors were encountered: