mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Mark classes of package uimanager as @Nullsafe (#43161)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43161 All these classes are NullSafe, let's mark them as NullSafe(Local) to ensure lint detect errors in the future changelog: [internal] internal bypass-github-export-checks Reviewed By: javache Differential Revision: D54027187 fbshipit-source-id: a25024ba7f7d4893a2b7d083e2ba10c5f2e3a035
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9f58b1a0fc
commit
e69faff265
+3
@@ -7,10 +7,13 @@
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
|
||||
// Common conditionals:
|
||||
// - `kind == PARENT` checks whether the node can host children in the native tree.
|
||||
// - `kind != NONE` checks whether the node appears in the native tree.
|
||||
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public enum NativeKind {
|
||||
// Node is in the native hierarchy and the HierarchyOptimizer should assume it can host children
|
||||
// (e.g. because it's a ViewGroup). Note that it's okay if the node doesn't support children. When
|
||||
|
||||
+3
@@ -7,10 +7,13 @@
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
|
||||
/**
|
||||
* Exception thrown when a class tries to access a native view by a tag that has no native view
|
||||
* associated with it.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
class NoSuchNativeViewException extends IllegalViewOperationException {
|
||||
|
||||
public NoSuchNativeViewException(String detailMessage) {
|
||||
|
||||
+2
@@ -9,11 +9,13 @@ package com.facebook.react.uimanager;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.util.Pools;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.uimanager.events.Event;
|
||||
|
||||
/** Event used to notify JS component about changes of its position or dimensions */
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public class OnLayoutEvent extends Event<OnLayoutEvent> {
|
||||
|
||||
private static final Pools.SynchronizedPool<OnLayoutEvent> EVENTS_POOL =
|
||||
|
||||
Reference in New Issue
Block a user