diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 2278507d31e..d233e647963 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -4421,7 +4421,7 @@ public abstract interface class com/facebook/react/uimanager/ReactCompoundViewGr public abstract fun interceptsTouchEvent (FF)Z } -public class com/facebook/react/uimanager/ReactInvalidPropertyException : java/lang/RuntimeException { +public final class com/facebook/react/uimanager/ReactInvalidPropertyException : java/lang/RuntimeException { public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.java deleted file mode 100644 index 63bdc3fa637..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.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.uimanager; - -import com.facebook.infer.annotation.Nullsafe; - -@Nullsafe(Nullsafe.Mode.LOCAL) -public class ReactInvalidPropertyException extends RuntimeException { - - public ReactInvalidPropertyException(String property, String value, String expectedValues) { - super( - "Invalid React property `" - + property - + "` with value `" - + value - + "`, expected " - + expectedValues); - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.kt new file mode 100644 index 00000000000..4ae599fad30 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.kt @@ -0,0 +1,16 @@ +/* + * 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.uimanager + +public class ReactInvalidPropertyException( + property: String, + value: String, + expectedValues: String +) : + RuntimeException( + "Invalid React property `$property` with value `$value`, expected $expectedValues")