Skip to content

Commit

Permalink
Switch equality check in BlobModule.java
Browse files Browse the repository at this point in the history
Summary:
Switch the equality check to avoid crash on the first item. The check can be on a null object and return the correct result.

Fixes #18709

Just a simple switch on equals, to make sure we're not bombing out by having a null scheme.

No related PRs and does not require a document change.

[ANDROID][BUGFIX][BlobModule] Switch equality check in BlobModule.java
Closes #18893

Differential Revision: D7658036

Pulled By: hramos

fbshipit-source-id: db61b98dae178dbbb645070f7b0d73ab43d30541
  • Loading branch information
shockdesign authored and facebook-github-bot committed Apr 17, 2018
1 parent 281ed9f commit 7c5d581
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onMessage(ByteString bytes, WritableMap params) {
@Override
public boolean supports(Uri uri, String responseType) {
String scheme = uri.getScheme();
boolean isRemote = scheme.equals("http") || scheme.equals("https");
boolean isRemote = "http".equals(scheme) || "https".equals(scheme);

return (!isRemote && responseType.equals("blob"));
}
Expand Down

0 comments on commit 7c5d581

Please sign in to comment.