Skip to content

Commit 5203354

Browse files
mdvaccafacebook-github-bot
authored andcommitted
NIT lint warns fixed in BlobProvider (#39614)
Summary: Pull Request resolved: #39614 NIT lint warns fixed in BlobProvider changelog: [internal] internal Reviewed By: christophpurrer Differential Revision: D49483635 fbshipit-source-id: 51f6f0d7841d2552f30ed64d0bb4447bd0b0ec54
1 parent e1d2a84 commit 5203354

File tree

1 file changed

+4
-3
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob

1 file changed

+4
-3
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final class BlobProvider extends ContentProvider {
2727

2828
private static final int PIPE_CAPACITY = 65536;
2929

30-
private ExecutorService executor = Executors.newSingleThreadExecutor();
30+
private final ExecutorService executor = Executors.newSingleThreadExecutor();
3131

3232
@Override
3333
public boolean onCreate() {
@@ -61,7 +61,8 @@ public int update(Uri uri, ContentValues values, String selection, String[] sele
6161
}
6262

6363
@Override
64-
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
64+
public @Nullable ParcelFileDescriptor openFile(Uri uri, String mode)
65+
throws FileNotFoundException {
6566
if (!mode.equals("r")) {
6667
throw new FileNotFoundException("Cannot open " + uri.toString() + " in mode '" + mode + "'");
6768
}
@@ -80,7 +81,7 @@ public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundEx
8081

8182
final byte[] data = blobModule.resolve(uri);
8283
if (data == null) {
83-
throw new FileNotFoundException("Cannot open " + uri.toString() + ", blob not found.");
84+
throw new FileNotFoundException("Cannot open " + uri + ", blob not found.");
8485
}
8586

8687
ParcelFileDescriptor[] pipe;

0 commit comments

Comments
 (0)