[Bug]: Null metadata values cause NPEs when converting parts between v1.0 and v0.3
What happened?
org.a2aproject.sdk.compat03.spec.TextPart_v0_3 类中。 v1.0和v0.3相互转换时,如果parts中的metadata中的值为null,会抛NPE异常.实际上A2A协议中可以允许medata的value为空.
同样的,在org.a2aproject.sdk.compat03.spec.DataPart_v0_3中也有这个问题.
Relevant log output
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Hi, would you be able to put the text into English? Thanks!
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.
@Orcus01 Yes, feel free. Just make sure that the behaviour is in line with the specs
Also, if you are able to translate the header that would be great :-D
Closing as I believe this was fixed by https://github.com/a2aproject/a2a-java/pull/1289 and https://github.com/a2aproject/a2a-java/pull/1261