Skip to content

Commit 9193dbd

Browse files
authored
Fix reflection invocation of PdeLanguageServer
Fixed argument type mismatch when invoking the PdeLanguageServer main method via reflection. Changed from using spread operator with a list wrapper to passing a properly typed String array directly. This resolves the IllegalArgumentException thrown during language server initialization.
1 parent d7717e2 commit 9193dbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/processing/app/Processing.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class LSP: SuspendingCliktCommand("lsp"){
5252
// Indirect invocation since app does not depend on java mode
5353
Class.forName("processing.mode.java.lsp.PdeLanguageServer")
5454
.getMethod("main", Array<String>::class.java)
55-
.invoke(null, *arrayOf<Any>(emptyList<String>()))
55+
.invoke(null, arrayOf<String>())
5656
} catch (e: Exception) {
5757
throw InternalError("Failed to invoke main method", e)
5858
}
@@ -87,4 +87,4 @@ class LegacyCLI(val args: Array<String>): SuspendingCliktCommand( "cli"){
8787
throw InternalError("Failed to invoke main method", e)
8888
}
8989
}
90-
}
90+
}

0 commit comments

Comments
 (0)