Remove deprecation warnings with Context.putAll
Closes gh-11476
This commit is contained in:
parent
7da34cfa2c
commit
206c6ffb54
|
@ -8,7 +8,7 @@ javaPlatform {
|
|||
|
||||
dependencies {
|
||||
api platform("org.springframework:spring-framework-bom:$springFrameworkVersion")
|
||||
api platform("io.projectreactor:reactor-bom:2020.0.19")
|
||||
api platform("io.projectreactor:reactor-bom:2022.0.0-M2")
|
||||
api platform("io.rsocket:rsocket-bom:1.1.2")
|
||||
api platform("org.junit:junit-bom:5.9.0-M1")
|
||||
api platform("org.springframework.data:spring-data-bom:2022.0.0-M4")
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ReactorContextTestExecutionListener extends DelegatingTestExecution
|
|||
return context;
|
||||
}
|
||||
Context toMerge = ReactiveSecurityContextHolder.withSecurityContext(Mono.just(this.securityContext));
|
||||
return toMerge.putAll(context);
|
||||
return toMerge.putAll(context.readOnly());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,8 +49,8 @@ public class ReactorContextWebFilter implements WebFilter {
|
|||
}
|
||||
|
||||
private Context withSecurityContext(Context mainContext, ServerWebExchange exchange) {
|
||||
return mainContext
|
||||
.putAll(this.repository.load(exchange).as(ReactiveSecurityContextHolder::withSecurityContext));
|
||||
return mainContext.putAll(
|
||||
this.repository.load(exchange).as(ReactiveSecurityContextHolder::withSecurityContext).readOnly());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue