Skip to content

Commit 9de725d

Browse files
committed
Remove deprecations
1 parent 85cc8e9 commit 9de725d

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

spring-cloud-function-web/src/main/java/org/springframework/cloud/function/web/flux/FunctionController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ public Mono<ResponseEntity<?>> get(ServerWebExchange request) {
179179
private FunctionWrapper wrapper(ServerWebExchange request) {
180180
FunctionInvocationWrapper function = (FunctionInvocationWrapper) request
181181
.getAttribute(WebRequestConstants.HANDLER);
182-
HttpHeaders headers = HttpHeaders.writableHttpHeaders(request.getRequest().getHeaders());
182+
HttpHeaders headers = new HttpHeaders(request.getRequest().getHeaders());
183183
headers.set("uri", request.getRequest().getURI().toString());
184-
FunctionWrapper wrapper = new FunctionWrapper(function);
184+
FunctionWrapper wrapper = new FunctionWrapper(function, null);
185185
wrapper.setHeaders(headers);
186186
wrapper.getParams().addAll(request.getRequest().getQueryParams());
187187
String argument = (String) request.getAttribute(WebRequestConstants.ARGUMENT);

spring-cloud-function-web/src/main/java/org/springframework/cloud/function/web/function/FunctionEndpointInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public <T> RouterFunction<?> functionEndpoints() {
244244
FunctionInvocationWrapper funcWrapper = extract(request);
245245
Class<?> outputType = funcWrapper == null ? Object.class
246246
: FunctionTypeUtils.getRawType(FunctionTypeUtils.getGenericType(funcWrapper.getOutputType()));
247-
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper);
247+
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper, null);
248248
Mono<ResponseEntity<?>> stream = request.bodyToMono(String.class)
249249
.flatMap(content -> (Mono<ResponseEntity<?>>) FunctionWebRequestProcessingHelper.processRequest(wrapper, content, false,
250250
functionHttpProperties.getIgnoredHeaders(), functionHttpProperties.getRequestOnlyHeaders()));
@@ -270,7 +270,7 @@ public <T> RouterFunction<?> functionEndpoints() {
270270
return ServerResponse.ok().body(result, outputType);
271271
}
272272
else {
273-
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper);
273+
FunctionWrapper wrapper = new FunctionWrapper(funcWrapper, null);
274274

275275
wrapper.setHeaders(request.headers().asHttpHeaders());
276276
String argument = (String) request.attribute(WebRequestConstants.ARGUMENT).get();

spring-cloud-function-web/src/main/java/org/springframework/cloud/function/web/util/FunctionWrapper.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ public class FunctionWrapper {
3939

4040
private final String method;
4141

42-
/**
43-
*
44-
* @param function instance of {@link FunctionInvocationWrapper}
45-
* @deprecated since 4.0.4 in favor of the constructor that takes Http method as second argument.
46-
*/
47-
@Deprecated
48-
public FunctionWrapper(FunctionInvocationWrapper function) {
49-
this(function, null);
50-
}
51-
5242
public FunctionWrapper(FunctionInvocationWrapper function, String method) {
5343
this.function = function;
5444
this.method = method;

0 commit comments

Comments
 (0)