Skip to content

fix: add no-args constructors to response/request classes for Gson compa…#938

Open
kabir wants to merge 1 commit into
a2aproject:1.0.xfrom
kabir:1.0.x-default-constructors
Open

fix: add no-args constructors to response/request classes for Gson compa…#938
kabir wants to merge 1 commit into
a2aproject:1.0.xfrom
kabir:1.0.x-default-constructors

Conversation

@kabir

@kabir kabir commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

…tibility

Gson's reflective adapter falls back to sun.misc.Unsafe.allocateInstance() when no no-args constructor is available. This fails in modular environments like WildFly's JBoss Modules. Adding no-args constructors lets Gson instantiate these classes directly without Unsafe.

Upstream #937

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds default no-argument constructors to several JSON-RPC response classes in the compat-0.3 specification package, likely to facilitate serialization and deserialization. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

…n compatibility

Gson's reflective adapter falls back to sun.misc.Unsafe.allocateInstance()
when no no-args constructor is available. This fails in modular environments
like WildFly's JBoss Modules. Adding no-args constructors lets Gson
instantiate these classes directly without Unsafe.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kabir kabir force-pushed the 1.0.x-default-constructors branch from 42414f1 to bded1db Compare June 17, 2026 15:14
@kabir kabir changed the title fix: add no-args constructors to v0.3 response classes for Gson compa… fix: add no-args constructors to response/request classes for Gson compa… Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant