Vino1016 commented on issue #578:
URL: https://github.com/apache/flink-agents/issues/578#issuecomment-4096429219

   @wenjin272 The null check you proposed can indeed avoid the NPE temporarily. 
However, I think it’s more of a workaround rather than a fundamental solution.
   The root problem is that required in the MCP spec is an optional boolean 
field, which means it can be null or omitted. Using the primitive boolean in 
PromptArgument cannot represent null values, which directly causes the 
exception during deserialization.
   For a more robust fix, we should change boolean to the wrapper type Boolean 
and set it to false by default when it is null.
   If we keep using primitive boolean without fixing the type, similar null 
pointer exceptions may occur in other places where PromptArgument is 
constructed or used in the future.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to