Commit 9bde5d03 by olly Committed by Oliver Woodman

[nullness] The nullness checking fixes of the media related files

We rolled back the previous <unknown commit> because some of the nullness checking fixes broke the exoplayer2 tests. We submit this CL into the TAP Global Presubmit train (https://test.corp.google.com/OCL:337620582:BASE:338201100:1603283151742:36afd5a5) and make sure that this CL wouldn't break any other tests on google3.

PiperOrigin-RevId: 338267548
parent 563767d5
...@@ -45,7 +45,9 @@ public final class DefaultMediaItemConverter implements MediaItemConverter { ...@@ -45,7 +45,9 @@ public final class DefaultMediaItemConverter implements MediaItemConverter {
@Override @Override
public MediaItem toMediaItem(MediaQueueItem item) { public MediaItem toMediaItem(MediaQueueItem item) {
// `item` came from `toMediaQueueItem()` so the custom JSON data must be set. // `item` came from `toMediaQueueItem()` so the custom JSON data must be set.
return getMediaItem(Assertions.checkNotNull(item.getMedia().getCustomData())); MediaInfo mediaInfo = item.getMedia();
Assertions.checkNotNull(mediaInfo);
return getMediaItem(Assertions.checkNotNull(mediaInfo.getCustomData()));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment