mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e1d2a8482e
commit
5203354d70
+4
-3
@@ -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 final class BlobProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
@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 final class BlobProvider extends ContentProvider {
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user