Skip to content

Commit

Permalink
with checkNotNull] fbandroid/libraries/components/litho-testing/src/m…
Browse files Browse the repository at this point in the history
…ain/java/com/facebook/litho/testing/viewtree/ViewExtractors.java

Reviewed By: jocelynluizzi13

Differential Revision: D66323220

fbshipit-source-id: 500a9c9082a3b6587256249fb21ac7fa5c45d319
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Nov 22, 2024
1 parent 293b49c commit 31540d7
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.facebook.litho.ComponentHost;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -51,14 +52,14 @@ public String apply(@Nullable View input) {
}
if (text == null) {
return String.format(
// NULLSAFE_FIXME[Nullable Dereference]
"No text found, view is %s", getVisibilityString(input.getVisibility()));
"No text found, view is %s",
getVisibilityString(Preconditions.checkNotNull(input).getVisibility()));
}

return String.format(
"Found text: \"%s\", view is %s",
// NULLSAFE_FIXME[Nullable Dereference]
Strings.nullToEmpty(text.toString()), getVisibilityString(input.getVisibility()));
Strings.nullToEmpty(text.toString()),
getVisibilityString(Preconditions.checkNotNull(input).getVisibility()));
}
};

Expand Down

0 comments on commit 31540d7

Please sign in to comment.