The ResponseCookie class already has @Nullable annotations for domain and path properties; but the builder was not synchronised with these declarations.
Comment From: jhoeller
This a bit of a subtle topic: On various builder APIs of ours, we tend to enforce non-null values for the calls given there, as a measure of API guidance. For a builder, arguably you shouldn't be calling a particular method if you have no value to provide, and resetting existing values is not part of the scope there. From that perspective, the present nullability mismatch is intentional.
Comment From: ghostd
I understand, thanks for the explanation. I'll close the PR.