Skip to content

Commit

Permalink
Mark ImageDecoder as nullable in addDecodingCapability
Browse files Browse the repository at this point in the history
Reviewed By: oprisnik

Differential Revision: D45944602

fbshipit-source-id: 1ded2f7dcebe25f948ecf6fbea15aec13a12546d
  • Loading branch information
javache authored and facebook-github-bot committed May 17, 2023
1 parent c22cfb9 commit 124bcb6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ public static class Builder {
public Builder addDecodingCapability(
ImageFormat imageFormat,
ImageFormat.FormatChecker imageFormatChecker,
ImageDecoder decoder) {
@Nullable ImageDecoder decoder) {
if (mCustomImageFormats == null) {
mCustomImageFormats = new ArrayList<>();
}
mCustomImageFormats.add(imageFormatChecker);
overrideDecoder(imageFormat, decoder);
if (decoder != null) {
overrideDecoder(imageFormat, decoder);
}
return this;
}

Expand Down

0 comments on commit 124bcb6

Please sign in to comment.