mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 06:29:10 +00:00
Polishing contribution
Closes gh-35294
This commit is contained in:
@@ -102,7 +102,8 @@ public class ProblemDetail implements Serializable {
|
||||
|
||||
/**
|
||||
* Setter for the {@link #getType() problem type}.
|
||||
* <p>By default, this is not set. According to the spec, when not present, its value is assumed to be "about:blank"
|
||||
* <p>By default, this is not set. According to the spec, when not present,
|
||||
* the type is assumed to be "about:blank"
|
||||
* @param type the problem type
|
||||
*/
|
||||
public void setType(@Nullable URI type) {
|
||||
|
||||
@@ -85,7 +85,7 @@ final class DefaultErrorResponseBuilder implements ErrorResponse.Builder {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErrorResponse.Builder type(URI type) {
|
||||
public ErrorResponse.Builder type(@Nullable URI type) {
|
||||
this.problemDetail.setType(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ErrorResponseException extends NestedRuntimeException implements Er
|
||||
* Set the {@link ProblemDetail#setType(URI) type} field of the response body.
|
||||
* @param type the problem type
|
||||
*/
|
||||
public void setType(URI type) {
|
||||
public void setType(@Nullable URI type) {
|
||||
this.body.setType(type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user