diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArray.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArray.java deleted file mode 100644 index 2a5233427ab..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArray.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.react.bridge; - -import com.facebook.jni.HybridClassBase; -import com.facebook.proguard.annotations.DoNotStrip; - -/** Base class for an array whose members are stored in native code (C++). */ -@DoNotStrip -public abstract class NativeArray extends HybridClassBase implements NativeArrayInterface { - static { - ReactBridge.staticInit(); - } - - protected NativeArray() {} - - @Override - public native String toString(); -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArray.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArray.kt new file mode 100644 index 00000000000..e70f2d76eec --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArray.kt @@ -0,0 +1,25 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.bridge + +import com.facebook.jni.HybridClassBase +import com.facebook.proguard.annotations.DoNotStrip + +/** Base class for an array whose members are stored in native code (C++). */ +@DoNotStrip +public abstract class NativeArray protected constructor() : + HybridClassBase(), NativeArrayInterface { + + external override fun toString(): String + + private companion object { + init { + ReactBridge.staticInit() + } + } +}