Repository navigation
fix: improve correctness and remove dead code across modules - #954
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces several cleanups, bug fixes, and robustness improvements across the SDK. Key changes include handling uppercase hex digits in HTML unescaping, ignoring CancellationException in the HTTP client's async error handling, deferring CDI context destruction for streaming endpoints in multi-version routes, and removing various unused methods, fields, and deprecated constructors. Feedback on these changes suggests optimizing the HTML unescaping utility with a fast-path check to avoid redundant string allocations, and limiting the exception cause traversal depth in the HTTP client to prevent potential infinite loops from circular references.
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.
605a42d to
5a8c308
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors several components, including extracting shared POST request building logic in RestTransport (and its v0.3 compat counterpart), simplifying user authentication fallback to UnauthenticatedUser in server routes, removing various unused or deprecated methods and fields across the codebase, and adding support for retrieving task IDs from Message events in authorization handling. Additionally, HtmlEscapeUtils was updated to handle uppercase hex digits. Review feedback suggests simplifying the custom parsing loop in HtmlEscapeUtils by chaining standard String.replace calls, and adding defensive null checks in RestTransport to prevent potential NullPointerExceptions when serializing payloads.
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.
- Fix null subject handling in server routes: use UnauthenticatedUser instead of AuthenticatedUser with empty string when subject is null - Handle uppercase hex digits in HtmlEscapeUtils unicode unescaping (< in addition to <), with tests - Extract buildPost() in REST transports to serialize the request body once instead of twice (once for logging, once for sending) - Add Message event handling in AuthorizationRequestHandlerDecorator to extract taskId from streaming messages - Remove deprecated A2AClientHTTPError constructors - Remove unused methods and fields: Utils_v0_3.unmarshalFrom(), Utils_v0_3.rethrow(), ServerCallContext.modelConfig, RequestContext.Builder getters, AsyncExecutorProducer.logPoolStats() Signed-off-by: Emmanuel Hugonnet <[email protected]>
instead of AuthenticatedUser with empty string when subject is null
(< in addition to <), with tests
once instead of twice (once for logging, once for sending)
extract taskId from streaming messages
Utils_v0_3.rethrow(), ServerCallContext.modelConfig,
RequestContext.Builder getters, AsyncExecutorProducer.logPoolStats()