Skip to content

[Bug]: Null metadata values cause NPEs when converting parts between v1.0 and v0.3 #1275

Closed

Description

@pandudu

What happened?

org.a2aproject.sdk.compat03.spec.TextPart_v0_3 类中。
v1.0和v0.3相互转换时,如果parts中的metadata中的值为null,会抛NPE异常.实际上A2A协议中可以允许medata的value为空.

Image

同样的,在org.a2aproject.sdk.compat03.spec.DataPart_v0_3中也有这个问题.
Image

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Nov 3, 2026
  2. kabir commented on Nov 3, 2026

    @kabir
    Collaborator

    Hi, would you be able to put the text into English? Thanks!

  3. Orcus01 commented on Nov 4, 2026

    @Orcus01
    Contributor

    Hi, I'd like to investigate this bug and contribute a fix. My understanding of the report is that converting between v1.0 and v0.3 throws a NullPointerException when a part's metadata contains a null value, affecting both TextPart_v0_3 and DataPart_v0_3. I'll first reproduce this and add regression tests for both part types and conversion directions before proposing a minimal fix. Please let me know if I've misunderstood the report or if someone is already working on it.

  4. kabir commented on Nov 4, 2026

    @kabir
    Collaborator

    @Orcus01 Yes, feel free. Just make sure that the behaviour is in line with the specs

  5. kabir commented on Nov 4, 2026

    @kabir
    Collaborator

    Also, if you are able to translate the header that would be great :-D

  6. changed the title [-][Bug]: v1.0和v0.3相互转换时,如果parts中的metadata中的值为null,会抛NPE异常[/-] [+][Bug]: Null metadata values cause NPEs when converting parts between v1.0 and v0.3[/+] on Nov 4, 2026
  7. kabir commented on Nov 4, 2026

    @kabir
    Collaborator

    Closing as I believe this was fixed by #1289 and #1261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions