Skip to content

Conversation

@ericbottard
Copy link
Member

No description provided.

}

public Builder context(Map<String, Object> context) {
public Builder context(Map<String, @Nullable Object> context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to accept both Map<String, @Nullable Object> and Map<String, Object> in null-marked code, it should be Map<String, ? extends @Nullable Object>. Is forcing Map<String, @Nullable Object> done on purpose here?

* @since 1.0.0
*/
public record ChatClientResponse(@Nullable ChatResponse chatResponse, Map<String, Object> context) {
public record ChatClientResponse(@Nullable ChatResponse chatResponse, Map<String, @Nullable Object> context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above, do we want Map<String, ? extends @Nullable Object> or Map<String, @Nullable Object> here?

@ericbottard ericbottard merged commit c5f4313 into spring-projects:main Jan 6, 2026
2 checks passed
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