mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-07-12 02:27:14 +00:00
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:
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user