missingAfterConversion flag for missing request values
Closes gh-26679
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -126,6 +126,12 @@ public class MatrixVariableMethodArgumentResolver extends AbstractNamedValueMeth
|
||||
throw new MissingMatrixVariableException(name, parameter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMissingValueAfterConversion(
|
||||
String name, MethodParameter parameter, NativeWebRequest request) throws Exception {
|
||||
|
||||
throw new MissingMatrixVariableException(name, parameter, true);
|
||||
}
|
||||
|
||||
private static final class MatrixVariableNamedValueInfo extends NamedValueInfo {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -101,6 +101,13 @@ public class PathVariableMethodArgumentResolver extends AbstractNamedValueMethod
|
||||
throw new MissingPathVariableException(name, parameter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMissingValueAfterConversion(
|
||||
String name, MethodParameter parameter, NativeWebRequest request) throws Exception {
|
||||
|
||||
throw new MissingPathVariableException(name, parameter, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void handleResolvedValue(@Nullable Object arg, String name, MethodParameter parameter,
|
||||
|
||||
Reference in New Issue
Block a user