Skip to content

Commit

Permalink
Remove deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
olegz committed Dec 20, 2024
1 parent 85cc8e9 commit 9de725d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ public Mono<ResponseEntity<?>> get(ServerWebExchange request) {
private FunctionWrapper wrapper(ServerWebExchange request) {
FunctionInvocationWrapper function = (FunctionInvocationWrapper) request
.getAttribute(WebRequestConstants.HANDLER);
HttpHeaders headers = HttpHeaders.writableHttpHeaders(request.getRequest().getHeaders());
HttpHeaders headers = new HttpHeaders(request.getRequest().getHeaders());
headers.set("uri", request.getRequest().getURI().toString());
FunctionWrapper wrapper = new FunctionWrapper(function);
FunctionWrapper wrapper = new FunctionWrapper(function, null);
wrapper.setHeaders(headers);
wrapper.getParams().addAll(request.getRequest().getQueryParams());
String argument = (String) request.getAttribute(WebRequestConstants.ARGUMENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public <T> RouterFunction<?> functionEndpoints() {
FunctionInvocationWrapper funcWrapper = extract(request);
Class<?> outputType = funcWrapper == null ? Object.class
: FunctionTypeUtils.getRawType(FunctionTypeUtils.getGenericType(funcWrapper.getOutputType()));
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper);
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper, null);
Mono<ResponseEntity<?>> stream = request.bodyToMono(String.class)
.flatMap(content -> (Mono<ResponseEntity<?>>) FunctionWebRequestProcessingHelper.processRequest(wrapper, content, false,
functionHttpProperties.getIgnoredHeaders(), functionHttpProperties.getRequestOnlyHeaders()));
Expand All @@ -270,7 +270,7 @@ public <T> RouterFunction<?> functionEndpoints() {
return ServerResponse.ok().body(result, outputType);
}
else {
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper);
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper, null);

wrapper.setHeaders(request.headers().asHttpHeaders());
String argument = (String) request.attribute(WebRequestConstants.ARGUMENT).get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ public class FunctionWrapper {

private final String method;

/**
*
* @param function instance of {@link FunctionInvocationWrapper}
* @deprecated since 4.0.4 in favor of the constructor that takes Http method as second argument.
*/
@Deprecated
public FunctionWrapper(FunctionInvocationWrapper function) {
this(function, null);
}

public FunctionWrapper(FunctionInvocationWrapper function, String method) {
this.function = function;
this.method = method;
Expand Down

0 comments on commit 9de725d

Please sign in to comment.