From 854cb6254d2a409ca0f0a3bbe40786da4a5c62f2 Mon Sep 17 00:00:00 2001 From: Gijs Weterings Date: Wed, 9 Apr 2025 09:07:30 -0700 Subject: [PATCH] Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java Summary: Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them Changelog: [Internal] Reviewed By: javache Differential Revision: D72460128 fbshipit-source-id: 5165055b1023a9eab86b97ef6cdfa9553c063ec0 --- .../com/facebook/react/views/text/ReactTextShadowNode.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java index a3819065d8b..9606f9adda4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java @@ -246,6 +246,7 @@ public class ReactTextShadowNode extends ReactBaseTextShadowNode { // Is used for single-line, boring text when the width is either unknown or bigger // than the width of the text. layout = + // NULLSAFE_FIXME[Not Vetted Third-Party] BoringLayout.make( text, textPaint, @@ -356,6 +357,7 @@ public class ReactTextShadowNode extends ReactBaseTextShadowNode { @Override @Nullable + // NULLSAFE_FIXME[Inconsistent Subclass Return Annotation] public Iterable calculateLayoutOnChildren() { // Run flexbox on and return the descendants which are inline views. @@ -372,6 +374,7 @@ public class ReactTextShadowNode extends ReactBaseTextShadowNode { for (TextInlineViewPlaceholderSpan placeholder : placeholders) { ReactShadowNode child = mInlineViews.get(placeholder.getReactTag()); + // NULLSAFE_FIXME[Nullable Dereference] child.calculateLayout(); shadowNodes.add(child); }