Skip to content

test(compat-0.3): cover null part metadata conversions - #1289

Merged
kabir merged 1 commit into
a2aproject:mainfrom
Orcus01:issue-1275
Nov 4, 2026
Merged

kabir merged 1 commit into
a2aproject:mainfrom
Orcus01:issue-1275

Conversation

@Orcus01

@Orcus01 Orcus01 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Description

Add regression coverage related to #1275: null metadata values when converting parts between v1.0 and v0.3.

The runtime fix is already merged in #1261 and included in 1.5.0.Final. This PR adds tests only:

  • Verify text and data parts preserve explicit null metadata values in both conversion directions, including direct assertions against the supplied metadata so dropped entries cannot go unnoticed.
  • Verify legacy text/data parts keep an unmodifiable defensive metadata copy when the caller changes the original map.

Temporarily restoring the two constructors from before #1261 reproduces the reported NPE in both new constructor regression cases. Current production code is unchanged.

Validation

  • JDK 17: selected compatibility-model, domain-mapper, and gRPC null suites — 83 tests passed, no failures or skips.
  • Scoped Spotless check under JDK 21 — passed.
  • git diff --check — passed.

Test command:

mvn -B -pl compat-0.3/server-conversion -am test -Dtest=NullValues_v0_3_Test,NullData_v0_3_Test,JSONRPCErrorSerialization_v0_3_Test,SubTypeSerialization_v0_3_Test,TaskSerialization_v0_3_Test,TaskMapper_v0_3_Test,TaskStatusUpdateEventMapper_v0_3_Test,FileContentMapper_v0_3_Test -Dsurefire.failIfNoSpecifiedTests=false
  • Follow the CONTRIBUTING guide.
  • Use a Conventional Commits title.
  • Ensure the tests pass.
  • README updates assessed: not needed for additional test coverage.

Related to #1275. Suggested English issue title: "[Bug]: Null metadata values cause NPEs when converting parts between v1.0 and v0.3".

Add regression coverage for text and data metadata conversion and defensive copying. The runtime fix is already in a2aproject#1261.

Related to a2aproject#1275.

Signed-off-by: Japneet Singh <japneet.singh2024@gmail.com>
@kabir
kabir merged commit a2c8a93 into a2aproject:main Nov 4, 2026
14 checks passed
@kabir

kabir commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Orcus01 !

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