Remove deprecations

This commit is contained in:
Oleg Zhurakousky
2024-12-20 11:01:43 +01:00
parent 85cc8e93e1
commit 9de725dab0
3 changed files with 4 additions and 14 deletions

View File

@@ -179,9 +179,9 @@ public class FunctionController {
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);

View File

@@ -244,7 +244,7 @@ class FunctionEndpointFactory {
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()));
@@ -270,7 +270,7 @@ class FunctionEndpointFactory {
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();

View File

@@ -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;