Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

The approvalResponse variable was incorrectly annotated with @SuppressWarnings("unused") despite being used in the subsequent session.sendEvent() call.

Changes:

  • Removed the suppression annotation from the approvalResponse variable declaration in MCPSample.java (line 394)
// Before
@SuppressWarnings("unused")
MCPApprovalResponseRequestItem approvalResponse =
    new MCPApprovalResponseRequestItem(approvalId, approved);

session.sendEvent(new ClientEventConversationItemCreate().setItem(approvalResponse))

// After
MCPApprovalResponseRequestItem approvalResponse =
    new MCPApprovalResponseRequestItem(approvalId, approved);

session.sendEvent(new ClientEventConversationItemCreate().setItem(approvalResponse))

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…Response variable

Co-authored-by: xitzhang <11403681+xitzhang@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on MCP sample with V2026_01_01_PREVIEW support Remove incorrect @SuppressWarnings("unused") annotation Jan 14, 2026
Copilot AI requested a review from xitzhang January 14, 2026 20:55
Base automatically changed from xitzhang/asyncmcpsample to main January 20, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants