Repository: cxf Updated Branches: refs/heads/master 519a67dfa -> a05d75086
Revert "[CXF-6843]:http 406 not acceptable should be returned if query parameter value can't be converted" This reverts commit 519a67dfa240471bb585929f263cd85051a9eb06. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a05d7508 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a05d7508 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a05d7508 Branch: refs/heads/master Commit: a05d75086453fa18ca4f4733f7cc8819693c786b Parents: 519a67d Author: Sergey Beryozkin <[email protected]> Authored: Sat Mar 26 12:49:21 2016 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Sat Mar 26 12:49:21 2016 +0000 ---------------------------------------------------------------------- .../java/org/apache/cxf/jaxrs/utils/InjectionUtils.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/a05d7508/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java index 99a6e1d..fa42c6f 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java @@ -459,14 +459,13 @@ public final class InjectionUtils { private static RuntimeException createParamConversionException(ParameterType pType, Exception ex) { // - // For path & matrix parameters this is 404, for query is 406 + // For path, query & matrix parameters this is 404, // for others 400... // - if (pType == ParameterType.QUERY) { - return ExceptionUtils.toNotAcceptableException(ex, null); - } else if (pType == ParameterType.PATH || pType == ParameterType.MATRIX) { + if (pType == ParameterType.PATH || pType == ParameterType.QUERY + || pType == ParameterType.MATRIX) { return ExceptionUtils.toNotFoundException(ex, null); - } + } return ExceptionUtils.toBadRequestException(ex, null); } public static <T> T createFromParameterHandler(String value,
