Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58973e3

Browse files
committed
Remove some unnecessary null checks
Change-Id: I0e8fdc3751bdffb37f229a1565ad97b065072541
1 parent 3cf050e commit 58973e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ public void getDocument() {
598598
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
599599
if (task.isSuccessful()) {
600600
DocumentSnapshot document = task.getResult();
601-
if (document != null && document.exists()) {
601+
if (document.exists()) {
602602
Log.d(TAG, "DocumentSnapshot data: " + document.getData());
603603
} else {
604604
Log.d(TAG, "No such document");

0 commit comments

Comments
 (0)