When returning a list of custom objects, RxJava throws an error but compiles
I am making an RxJava call and the end result I subscribed to is a booking list.
The code works fine, but I get this annoying highlight:
The cast doesn't work here because I can't use List <Booking>
to List <Object>
.
Okay, you could say that I should just replace it with a lambda expression, but in a method, call()
I need to call a method that takes List <Booking>
as a parameter:
How can I avoid highlighting in any of these cases?
+3
source to share