Skip to content

Commit b3215e2

Browse files
committed
refactor: make implementation param/return non optional
1 parent 3e0000e commit b3215e2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

assets/plugin-template/android/src/main/kotlin/__JAVA_PATH__.kt.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import android.util.Log
44

55
class {{ CLASS }} {
66
7-
fun echo(value: String?): String? {
8-
Log.i("Echo", value ?: "null")
7+
fun echo(value: String): String {
8+
Log.i("Echo", value)
99
1010
return value
1111
}

assets/plugin-template/android/src/main/kotlin/__JAVA_PATH__Plugin.kt.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class {{ CLASS }}Plugin : Plugin() {
1313

1414
@PluginMethod
1515
fun echo(call: PluginCall) {
16-
val value = call.getString("value")
16+
val value = call.getString("value") ?: ""
1717
1818
val ret = JSObject().apply {
1919
put("value", implementation.echo(value))

0 commit comments

Comments
 (0)