diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java index a5110807c3cd6f..44afcecd8e9df4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java @@ -27,7 +27,7 @@ public final class BlobProvider extends ContentProvider { private static final int PIPE_CAPACITY = 65536; - private ExecutorService executor = Executors.newSingleThreadExecutor(); + private final ExecutorService executor = Executors.newSingleThreadExecutor(); @Override public boolean onCreate() { @@ -61,7 +61,8 @@ public int update(Uri uri, ContentValues values, String selection, String[] sele } @Override - public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { + public @Nullable ParcelFileDescriptor openFile(Uri uri, String mode) + throws FileNotFoundException { if (!mode.equals("r")) { throw new FileNotFoundException("Cannot open " + uri.toString() + " in mode '" + mode + "'"); } @@ -80,7 +81,7 @@ public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundEx final byte[] data = blobModule.resolve(uri); if (data == null) { - throw new FileNotFoundException("Cannot open " + uri.toString() + ", blob not found."); + throw new FileNotFoundException("Cannot open " + uri + ", blob not found."); } ParcelFileDescriptor[] pipe;