committed by
Sam Brannen
parent
487e14d549
commit
f8340838b3
@@ -94,7 +94,7 @@ public abstract class ExchangeFilterFunctions {
|
||||
return ExchangeFilterFunction.ofRequestProcessor(request ->
|
||||
credentialsFunction.apply(request)
|
||||
.map(credentials -> Mono.just(insertAuthorizationHeader(request, credentials)))
|
||||
.orElse(Mono.just(request)));
|
||||
.orElseGet(() -> Mono.just(request)));
|
||||
}
|
||||
|
||||
private static void checkIllegalCharacters(String username, String password) {
|
||||
|
||||
@@ -139,7 +139,7 @@ class ModelInitializer {
|
||||
.ofNullable(AnnotatedElementUtils.findMergedAnnotation(param.getAnnotatedElement(), ModelAttribute.class))
|
||||
.filter(ann -> StringUtils.hasText(ann.value()))
|
||||
.map(ModelAttribute::value)
|
||||
.orElse(Conventions.getVariableNameForParameter(param));
|
||||
.orElseGet(() -> Conventions.getVariableNameForParameter(param));
|
||||
}
|
||||
|
||||
/** Find {@code @ModelAttribute} arguments also listed as {@code @SessionAttributes}. */
|
||||
|
||||
@@ -244,7 +244,7 @@ public class RedirectView extends AbstractUrlBasedView {
|
||||
while (found) {
|
||||
String name = matcher.group(1);
|
||||
Object value = (model.containsKey(name) ? model.get(name) : uriVariables.get(name));
|
||||
Assert.notNull(value, "No value for URI variable '" + name + "'");
|
||||
Assert.notNull(value, () -> "No value for URI variable '" + name + "'");
|
||||
result.append(targetUrl.substring(endLastMatch, matcher.start()));
|
||||
result.append(encodeUriVariable(value.toString()));
|
||||
endLastMatch = matcher.end();
|
||||
|
||||
@@ -286,7 +286,7 @@ public class ViewResolutionResultHandler extends HandlerResultHandlerSupport
|
||||
return Optional.ofNullable(returnType.getMethodAnnotation(ModelAttribute.class))
|
||||
.filter(ann -> StringUtils.hasText(ann.value()))
|
||||
.map(ModelAttribute::value)
|
||||
.orElse(Conventions.getVariableNameForParameter(returnType));
|
||||
.orElseGet(() -> Conventions.getVariableNameForParameter(returnType));
|
||||
}
|
||||
|
||||
private void updateBindingContext(BindingContext context, ServerWebExchange exchange) {
|
||||
|
||||
Reference in New Issue
Block a user