Skip to content

Commit c44c853

Browse files
Strip usage of deprecations
1 parent e54be7b commit c44c853

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/resolver/ErrorResponseProblemResolver.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ public ErrorResponseProblemResolver(ProblemFormat problemFormat) {
6767
* <p>The provided {@code status} parameter is ignored in favor of the status contained in the
6868
* exception. {@code headers} and {@code context} are currently not used but are part of the SPI.
6969
*
70-
* <p>Deprecation of {@link ProblemBuilder#extension(java.util.Map)} is ignored, as this library
71-
* is supposed to work with {@code problem4j-core:1.3.x} (any version from {@code 1.3.x}
72-
* generation).
73-
*
74-
* <p>TODO: resolve deprecation while releasing {@code problem4j-spring:2.2.0}
75-
*
7670
* @param context problem context (unused)
7771
* @param ex the {@link ErrorResponseException} to convert
7872
* @param headers HTTP response headers (unused)
@@ -81,7 +75,6 @@ public ErrorResponseProblemResolver(ProblemFormat problemFormat) {
8175
* @see org.springframework.web.ErrorResponse
8276
*/
8377
@Override
84-
@SuppressWarnings("deprecation")
8578
public ProblemBuilder resolveBuilder(
8679
ProblemContext context, Exception ex, HttpHeaders headers, HttpStatusCode status) {
8780
ErrorResponseException e = (ErrorResponseException) ex;
@@ -94,7 +87,7 @@ public ProblemBuilder resolveBuilder(
9487
.instance(e.getBody().getInstance());
9588

9689
if (e.getBody().getProperties() != null) {
97-
builder = builder.extension(e.getBody().getProperties());
90+
builder = builder.extensions(e.getBody().getProperties());
9891
}
9992

10093
return builder;

0 commit comments

Comments
 (0)