Commit ece8d223 by ibaker Committed by Oliver Woodman

Remove a suppression introduced by the checker-framework 3.3.0 upgrade

Update the comment on a suppression of Field.get(null) which is safe
but blocked by the checker.

These suppressions were introduced in https://github.com/google/ExoPlayer/commit/d1e057244812a566a5fc8b18a2caec1908db1a43

PiperOrigin-RevId: 307036441
parent ca2105d5
......@@ -166,7 +166,7 @@ public final class CronetEngineWrapper {
private final boolean preferGMSCoreCronet;
// Multi-catch can only be used for API 19+ in this case.
// incompatible types in argument.
// Field#get(null) is blocked by the null-checker, but is safe because the field is static.
@SuppressWarnings({"UseMultiCatch", "nullness:argument.type.incompatible"})
public CronetProviderComparator(boolean preferGMSCoreCronet) {
// GMSCore CronetProvider classes are only available in some configurations.
......
......@@ -96,8 +96,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
return Assertions.checkNotNull(trackGroups);
}
// unboxing a possibly-null reference streamPeriodIndices.get(streams[i])
@SuppressWarnings("nullness:unboxing.of.nullable")
@Override
public long selectTracks(
@NullableType TrackSelection[] selections,
......@@ -109,8 +107,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
int[] streamChildIndices = new int[selections.length];
int[] selectionChildIndices = new int[selections.length];
for (int i = 0; i < selections.length; i++) {
streamChildIndices[i] = streams[i] == null ? C.INDEX_UNSET
: streamPeriodIndices.get(streams[i]);
Integer streamChildIndex = streams[i] == null ? null : streamPeriodIndices.get(streams[i]);
streamChildIndices[i] = streamChildIndex == null ? C.INDEX_UNSET : streamChildIndex;
selectionChildIndices[i] = C.INDEX_UNSET;
if (selections[i] != null) {
TrackGroup trackGroup = selections[i].getTrackGroup();
......
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