Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CC776200B82 for ; Fri, 16 Sep 2016 12:30:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CB068160AC4; Fri, 16 Sep 2016 10:30:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 147DC160A8C for ; Fri, 16 Sep 2016 12:30:23 +0200 (CEST) Received: (qmail 37887 invoked by uid 500); 16 Sep 2016 10:30:23 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 37877 invoked by uid 99); 16 Sep 2016 10:30:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2016 10:30:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 12014E008F; Fri, 16 Sep 2016 10:30:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <4066e6e4c94d4d0ab2b747c7391fdfa9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Finalizing applying the patch from Vjacheslav V. Borisov, This closes #172 Date: Fri, 16 Sep 2016 10:30:23 +0000 (UTC) archived-at: Fri, 16 Sep 2016 10:30:25 -0000 Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 630a1ed48 -> 4e787778c Finalizing applying the patch from Vjacheslav V. Borisov, This closes #172 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4e787778 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4e787778 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4e787778 Branch: refs/heads/3.1.x-fixes Commit: 4e787778cdf5f836a811a611e64334e9730720ef Parents: 630a1ed Author: Sergey Beryozkin Authored: Fri Sep 16 11:28:10 2016 +0100 Committer: Sergey Beryozkin Committed: Fri Sep 16 11:30:05 2016 +0100 ---------------------------------------------------------------------- .../cxf/jaxrs/validation/ValidationExceptionMapper.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/4e787778/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/ValidationExceptionMapper.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/ValidationExceptionMapper.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/ValidationExceptionMapper.java index b0d0938..146d105 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/ValidationExceptionMapper.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/validation/ValidationExceptionMapper.java @@ -60,7 +60,7 @@ public class ValidationExceptionMapper implements ExceptionMapper< ValidationExc } ResponseBuilder rb = JAXRSUtils.toResponseBuilder(errorStatus); if (responseBody != null) { - rb.entity(responseBody); + rb.entity(responseBody.toString()); } return rb.build(); } else { @@ -68,8 +68,10 @@ public class ValidationExceptionMapper implements ExceptionMapper< ValidationExc } } private String getMessage(ConstraintViolation violation) { - return violation.getRootBeanClass().getSimpleName() - + "." + violation.getPropertyPath() + return "Value " + + (violation.getInvalidValue() != null ? "'" + violation.getInvalidValue().toString() + "'" : "(null)") + + " of " + violation.getRootBeanClass().getSimpleName() + + "." + violation.getPropertyPath() + ": " + violation.getMessage(); } /**