You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: preserve explicit JSON nulls in value mappings for ListTasks without raising NullPointerExceptions #1207
I am seeing this same NullPointerException raised, as described here, #1160, during a ListTasks method call.. could you please take a look?
Im using version 1.4.0.Final
I'll first try to reproduce the NPE on the current main with a ListTasks response containing explicit JSON nulls, covering both the JSON-RPC and REST paths. If it still reproduces, I'll open a PR with a regression test, following the same approach as #1174 for GetTask.
I tried to reproduce this on the latest main (05f5d9b) and couldn't trigger the response-side NPE. Explicit nulls in optional fields, metadata at every level, nested objects and arrays all deserialize fine on both the JSON-RPC and REST paths. The fix from #1174 also seems to be included in 1.4.0.Final already.
While testing, though, I did hit a separate NPE on the request side when calling listTasks(ListTasksParams.builder().build(), null) on JSONRPCTransport, which leaves the optional tenant unset (null), before any HTTP request is sent:
java.lang.NullPointerException
at org.a2aproject.sdk.grpc.ListTasksRequest$Builder.setTenant(ListTasksRequest.java:910)
at org.a2aproject.sdk.grpc.mapper.ListTasksParamsMapperImpl.toProto(ListTasksParamsMapperImpl.java:44)
at org.a2aproject.sdk.grpc.utils.ProtoUtils$ToProto.listTasksParams(ProtoUtils.java:104)
at org.a2aproject.sdk.client.transport.jsonrpc.JSONRPCTransport.listTasks(JSONRPCTransport.java:177)
@loveen0111 could you share the stack trace you're seeing? If it matches this one, I'm happy to open a PR with a regression test for it.
Activity
Emryswu commentedon Oct 21, 2026
Hi, I'd like to take this one.
I'll first try to reproduce the NPE on the current main with a ListTasks response containing explicit JSON nulls, covering both the JSON-RPC and REST paths. If it still reproduces, I'll open a PR with a regression test, following the same approach as #1174 for GetTask.
Emryswu commentedon Oct 21, 2026
I tried to reproduce this on the latest main (05f5d9b) and couldn't trigger the response-side NPE. Explicit nulls in optional fields, metadata at every level, nested objects and arrays all deserialize fine on both the JSON-RPC and REST paths. The fix from #1174 also seems to be included in 1.4.0.Final already.
While testing, though, I did hit a separate NPE on the request side when calling
listTasks(ListTasksParams.builder().build(), null)onJSONRPCTransport, which leaves the optionaltenantunset (null), before any HTTP request is sent:@loveen0111 could you share the stack trace you're seeing? If it matches this one, I'm happy to open a PR with a regression test for it.
fix(grpc): avoid NPE when listTasks is called without a tenant