mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Reduce visibility of internals of BridgelessAtomicRef (#37165)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37165 Reduce visibility of internals of BridgelessAtomicRef changelog: [internal] internal Reviewed By: philIip Differential Revision: D45378245 fbshipit-source-id: c9cd6b7afacc4f0db079cd13cb7c32b44b22cdfe
This commit is contained in:
committed by
Facebook GitHub Bot
parent
776ad8526c
commit
5f381dbf10
+4
-3
@@ -12,6 +12,7 @@ import static com.facebook.infer.annotation.Assertions.assertNotNull;
|
||||
import android.annotation.SuppressLint;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import java.util.Objects;
|
||||
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
class BridgelessAtomicRef<T> {
|
||||
@@ -30,8 +31,8 @@ class BridgelessAtomicRef<T> {
|
||||
Failure
|
||||
}
|
||||
|
||||
volatile State state;
|
||||
volatile String failureMessage;
|
||||
private volatile State state;
|
||||
private volatile String failureMessage;
|
||||
|
||||
public BridgelessAtomicRef(@Nullable T initialValue) {
|
||||
mValue = initialValue;
|
||||
@@ -77,7 +78,7 @@ class BridgelessAtomicRef<T> {
|
||||
synchronized (this) {
|
||||
state = State.Failure;
|
||||
String message = ex.getMessage();
|
||||
failureMessage = message != null ? message : "null";
|
||||
failureMessage = Objects.toString(message, "null");
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user