BiDiJson: map results to null for commands that return Void

Fixes java.lang.UnsupportedOperationException: Unsupported type: class java.lang.Void
This commit is contained in:
Alex Osborne
2026-07-10 16:05:27 +09:00
parent 97d8307420
commit 58258eb640
@@ -111,7 +111,7 @@ class BiDiJson {
@SuppressWarnings("unchecked")
static <T> T fromJson(Object value, Class<T> type) {
try {
if (value == JSONObject.NULL) {
if (value == JSONObject.NULL || type == Void.class) {
return null;
}
if (value == null || type.isPrimitive() || type.isAssignableFrom(value.getClass())) {