Skip to content

Commit

Permalink
with checkNotNull] fbandroid/libraries/fresco/animated-gif-lite/src/m…
Browse files Browse the repository at this point in the history
…ain/java/com/facebook/animated/giflite/decoder/GifMetadataDecoder.java

Reviewed By: jocelynluizzi13

Differential Revision: D68765387

fbshipit-source-id: 6c004c0622f17af9d757904f16f7a8d6bc02d7d1
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Jan 28, 2025
1 parent 9d88802 commit 587ee66
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

package com.facebook.animated.giflite.decoder;

import com.facebook.common.preconditions.Preconditions;
import com.facebook.infer.annotation.Nullsafe;
import java.io.EOFException;
import java.io.IOException;
Expand Down Expand Up @@ -258,8 +259,7 @@ private int readIntoBlock(int offset, int length) throws IOException {
int count = mInputStream.read(block, offset, length);
mCurrentOffset += length;
if (shouldFixStream) {
// NULLSAFE_FIXME[Nullable Dereference]
mOutputStream.write(block, offset, length);
Preconditions.checkNotNull(mOutputStream).write(block, offset, length);
}
if (count == -1) {
throw new EOFException("Unexpected end of gif file");
Expand All @@ -275,8 +275,7 @@ private int readAndWriteNextByte() throws IOException {

private void writeNextByte(int b) throws IOException {
if (shouldFixStream) {
// NULLSAFE_FIXME[Nullable Dereference]
mOutputStream.write(b);
Preconditions.checkNotNull(mOutputStream).write(b);
}
}

Expand Down

0 comments on commit 587ee66

Please sign in to comment.