[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
This commit is contained in:
olly 2020-10-21 16:27:28 +01:00 committed by Oliver Woodman
parent 563767d5e9
commit 9bde5d0351

View File

@ -45,7 +45,9 @@ public final class DefaultMediaItemConverter implements MediaItemConverter {
@Override
public MediaItem toMediaItem(MediaQueueItem item) {
// `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