Skip to content

Commit 413c3df

Browse files
committed
PIP-908 Address Sonar feedback after switching to new spring-boot version 3.5.7
1 parent 536c760 commit 413c3df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/ihtsdo/rvf/rest/helper/ControllerHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import org.springframework.web.context.request.RequestAttributes;
1111
import org.springframework.web.context.request.RequestContextHolder;
1212
import org.springframework.web.context.request.ServletRequestAttributes;
13-
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
1413

1514
import jakarta.servlet.http.HttpServletRequest;
15+
import org.springframework.web.util.UriComponentsBuilder;
1616

1717
@Component
1818
public class ControllerHelper {
@@ -49,9 +49,9 @@ public static HttpHeaders getCreatedLocationHeaders(String id, String removePath
4949

5050
HttpHeaders httpHeaders = new HttpHeaders();
5151
if (params != null) {
52-
httpHeaders.setLocation(ServletUriComponentsBuilder.fromHttpUrl(requestUrl).path("/{id}").queryParams(params).buildAndExpand(id).toUri());
52+
httpHeaders.setLocation(UriComponentsBuilder.fromUriString(requestUrl).path("/{id}").queryParams(params).buildAndExpand(id).toUri());
5353
} else {
54-
httpHeaders.setLocation(ServletUriComponentsBuilder.fromHttpUrl(requestUrl).path("/{id}").buildAndExpand(id).toUri());
54+
httpHeaders.setLocation(UriComponentsBuilder.fromUriString(requestUrl).path("/{id}").buildAndExpand(id).toUri());
5555
}
5656
return httpHeaders;
5757
}

0 commit comments

Comments
 (0)