Skip to content

Commit 482212e

Browse files
fix: KotlinNullnessAnnotation warning (#829)
## 📜 Description remove unnecessary @nullable Annotation in kotlin ```log Error: Do not use @nullable in Kotlin; the nullability is already implied by the Kotlin type NativeModule? ending with ? [KotlinNullnessAnnotation] @nullable ~~~~~~~~~ Explanation for issues of type "KotlinNullnessAnnotation": In Kotlin, nullness is part of the type system; s: String is never null and s: String? is sometimes null, whether or not you add in additional annotations stating @nonnull or @nullable. These are likely copy/paste mistakes, and are misleading. ``` ## 💡 Motivation and Context This problem will cause warning. Because warning as error, it will cause build failed ## 📢 Changelog ### Android remove unnecessary @nullable annotation KeyboardControllerPackage.getModule ## 🤔 How Has This Been Tested? This commit not include any code logic change, so this is unlikely to be a problem. ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 79b7d1f commit 482212e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

android/src/turbo/java/com/reactnativekeyboardcontroller/KeyboardControllerPackage.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.reactnativekeyboardcontroller
22

3-
import androidx.annotation.Nullable
43
import com.facebook.react.TurboReactPackage
54
import com.facebook.react.bridge.NativeModule
65
import com.facebook.react.bridge.ReactApplicationContext
@@ -11,7 +10,6 @@ import com.reactnativekeyboardcontroller.modules.KeyboardControllerModuleImpl
1110
import com.reactnativekeyboardcontroller.modules.StatusBarManagerCompatModuleImpl
1211

1312
class KeyboardControllerPackage : TurboReactPackage() {
14-
@Nullable
1513
override fun getModule(
1614
name: String,
1715
reactContext: ReactApplicationContext,

0 commit comments

Comments
 (0)