mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Annotate NullSafe(LOCAL) for classes in java/com/facebook/react/text (#49772)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49772 Nullsafety scripts and analysis determine it's safe to annotate these classes as NullSafe(LOCAL) changelog: [internal] internal Reviewed By: javache Differential Revision: D70464133 fbshipit-source-id: d3734957dde5b097980fb2c5feb00aa248566bda
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4e35676149
commit
db8afb0f96
+2
@@ -8,6 +8,7 @@
|
||||
package com.facebook.react.views.text;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
@@ -17,6 +18,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
* {@link ReactShadowNode} class for pure raw text node (aka {@code textContent} in terms of DOM).
|
||||
* Raw text node can only have simple string value without any attributes, properties or state.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public class ReactRawTextShadowNode extends ReactShadowNodeImpl {
|
||||
|
||||
@VisibleForTesting public static final String PROP_TEXT = "text";
|
||||
|
||||
+2
@@ -9,6 +9,7 @@ package com.facebook.react.views.text;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ViewDefaults;
|
||||
@@ -20,6 +21,7 @@ import com.facebook.react.uimanager.ViewDefaults;
|
||||
* the rendered aka effective value. For example, to figure out the rendered/effective font size,
|
||||
* you need to take into account the fontSize, maxFontSizeMultiplier, and allowFontScaling props.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public class TextAttributes {
|
||||
// Setting the default to 0 indicates that there is no max.
|
||||
public static final float DEFAULT_MAX_FONT_SIZE_MULTIPLIER = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user