Closed JakePi3 closed 7 years ago
I have an API roughly corresponding to:
void getResult(String key1, String key2, Handler<AsyncResult<Result>> handler); void getBulkResults(List<JsonArray> lookup, Handler<AsyncResult<List<Result>>> handler);
The first function results in generated code that handles null values:
msg.reply(res.result() == null ? null : res.result().toJson());
But the generated code for the second function assumes all elements in the list are non-null:
msg.reply(new JsonArray(res.result().stream().map(Result::toJson).collect(Collectors.toList())));
Ideally there'd be consistency in the generated code. In this case return nulls inside the list (and serialize as [ ..., null, ... ]
I have an API roughly corresponding to:
The first function results in generated code that handles null values:
But the generated code for the second function assumes all elements in the list are non-null:
Ideally there'd be consistency in the generated code. In this case return nulls inside the list (and serialize as [ ..., null, ... ]