Polishing contribution

Closes gh-29868
This commit is contained in:
rstoyanchev 2023-01-30 16:48:57 +00:00
parent aa9f445422
commit 15931532cd
5 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -206,7 +206,8 @@ public class ProblemDetail {
* are rendered as top level key-value pairs in the output JSON. Otherwise,
* they are rendered as a {@code "properties"} sub-map.
* @param name the property name
* @param value the property value
* @param value the property value, possibly {@code null} if the intent is
* to include a property with its value set to "null"
* @see org.springframework.http.converter.json.ProblemDetailJacksonMixin
*/
public void setProperty(String name, @Nullable Object value) {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -122,7 +122,7 @@ final class DefaultErrorResponseBuilder implements ErrorResponse.Builder {
}
@Override
public ErrorResponse.Builder property(String name, Object value) {
public ErrorResponse.Builder property(String name, @Nullable Object value) {
this.problemDetail.setProperty(name, value);
return this;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -265,7 +265,7 @@ public interface ErrorResponse {
* property} on the underlying {@code ProblemDetail}.
* @return the same builder instance
*/
Builder property(String name, Object value);
Builder property(String name, @Nullable Object value);
/**
* Build the {@code ErrorResponse} instance.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.