Skip to content

Commit

Permalink
with checkNotNull] fbandroid/libraries/textlayoutbuilder/library/libs…
Browse files Browse the repository at this point in the history
…/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy/StaticLayoutProxy.java

Reviewed By: jocelynluizzi13

Differential Revision: D66367381

fbshipit-source-id: cc0eb908325a3c0dba263d4497e8d7960116e6f6
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Nov 26, 2024
1 parent c9e95ea commit d56da2f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import androidx.core.text.TextDirectionHeuristicCompat;
import androidx.core.text.TextDirectionHeuristicsCompat;
import com.facebook.infer.annotation.Nullsafe;
import com.google.common.base.Preconditions;

@Nullsafe(Nullsafe.Mode.LOCAL)
public class StaticLayoutProxy {
Expand Down Expand Up @@ -60,8 +61,7 @@ public static StaticLayout create(
} catch (IllegalArgumentException e) {
// Retry creating the layout if the first attempt failed due to a race condition.
// See https://code.google.com/p/android/issues/detail?id=188163
// NULLSAFE_FIXME[Nullable Dereference]
if (e.getMessage().contains("utext_close")) {
if (Preconditions.checkNotNull(e.getMessage()).contains("utext_close")) {
return new StaticLayout(
text,
start,
Expand Down

0 comments on commit d56da2f

Please sign in to comment.