#2966 RxJava2 null - case underlying method has needs to return null.

Need to wrap return result with Optional<>
Mark code path with TODO. Actual fix is pending #2954 merge.

Rx observer: underlying sources that need to return Optional<>
OnlineFeedViewActivity.parseFeed : <anonymous subscriber>
PlaybackController.bindToService : fixed in #2954
This commit is contained in:
orionlee 2019-01-10 12:19:04 -08:00
parent 1655d234af
commit c04f340ae2

View File

@ -316,6 +316,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
Log.d(TAG, "Parsing feed");
parser = Observable.fromCallable(() -> {
// TODO: [PENDING 2954] return Optional<FeedHandlerResult>
FeedHandler handler = new FeedHandler();
try {
return handler.parseFeed(feed);
@ -337,7 +338,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
})
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(result -> {
.subscribe(result -> { // TODO: [PENDING 2954] wrap underlying Nullable return with Optional<>
if(result != null) {
beforeShowFeedInformation(result.feed);
showFeedInformation(result.feed, result.alternateFeedUrls);