Add @Nullable to ProblemDetail.setProperty argument
See gh-29868
This commit is contained in:
committed by
rstoyanchev
parent
b578ff1296
commit
aa9f445422
@@ -209,7 +209,7 @@ public class ProblemDetail {
|
||||
* @param value the property value
|
||||
* @see org.springframework.http.converter.json.ProblemDetailJacksonMixin
|
||||
*/
|
||||
public void setProperty(String name, Object value) {
|
||||
public void setProperty(String name, @Nullable Object value) {
|
||||
this.properties = (this.properties != null ? this.properties : new LinkedHashMap<>());
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import org.springframework.http.ProblemDetail;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY;
|
||||
|
||||
@@ -46,7 +47,7 @@ import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY;
|
||||
public interface ProblemDetailJacksonMixin {
|
||||
|
||||
@JsonAnySetter
|
||||
void setProperty(String name, Object value);
|
||||
void setProperty(String name, @Nullable Object value);
|
||||
|
||||
@JsonAnyGetter
|
||||
Map<String, Object> getProperties();
|
||||
|
||||
Reference in New Issue
Block a user