Skip to content

Commit

Permalink
NIT lint warns fixed in BlobProvider (#39614)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #39614

NIT lint warns fixed in BlobProvider

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D49483635

fbshipit-source-id: 51f6f0d7841d2552f30ed64d0bb4447bd0b0ec54
  • Loading branch information
mdvacca authored and facebook-github-bot committed Sep 27, 2023
1 parent e1d2a84 commit 5203354
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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 + "'");
}
Expand All @@ -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;
Expand Down

0 comments on commit 5203354

Please sign in to comment.