From 5203354d707ca26cae36de4fd85275f07f42e2fd Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 26 Sep 2023 18:58:56 -0700 Subject: [PATCH] NIT lint warns fixed in BlobProvider (#39614) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39614 NIT lint warns fixed in BlobProvider changelog: [internal] internal Reviewed By: christophpurrer Differential Revision: D49483635 fbshipit-source-id: 51f6f0d7841d2552f30ed64d0bb4447bd0b0ec54 --- .../java/com/facebook/react/modules/blob/BlobProvider.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;