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 D8B04200B55 for ; Sun, 31 Jul 2016 14:23:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D72FC160A6C; Sun, 31 Jul 2016 12:23:19 +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 2BC62160A66 for ; Sun, 31 Jul 2016 14:23:19 +0200 (CEST) Received: (qmail 60212 invoked by uid 500); 31 Jul 2016 12:23:18 -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 60203 invoked by uid 99); 31 Jul 2016 12:23:18 -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; Sun, 31 Jul 2016 12:23:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0FFF7E1101; Sun, 31 Jul 2016 12:23:18 +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: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6983] Avoiding the error message duplication, patch from Mike Golod applied, This closes #148 Date: Sun, 31 Jul 2016 12:23:18 +0000 (UTC) archived-at: Sun, 31 Jul 2016 12:23:20 -0000 Repository: cxf Updated Branches: refs/heads/3.1.x-fixes fcf585eb1 -> dc45b95cc [CXF-6983] Avoiding the error message duplication, patch from Mike Golod applied, This closes #148 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/dc45b95c Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/dc45b95c Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/dc45b95c Branch: refs/heads/3.1.x-fixes Commit: dc45b95ccd994a73560352b4c939d534e923e952 Parents: fcf585e Author: Sergey Beryozkin Authored: Sun Jul 31 15:20:35 2016 +0300 Committer: Sergey Beryozkin Committed: Sun Jul 31 15:22:59 2016 +0300 ---------------------------------------------------------------------- .../org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/dc45b95c/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java index 9e359f0..9fe46dd 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java @@ -721,7 +721,10 @@ public abstract class AbstractJAXBProvider extends AbstractConfigurableProvid } cause = cause.getCause(); } - sb.append(linked.getMessage()).append(". "); + String msg = linked.getMessage(); + if (sb.lastIndexOf(msg) == -1) { + sb.append(msg).append(". "); + } } Throwable t = linked != null ? linked : e.getCause() != null ? e.getCause() : e; String message = new org.apache.cxf.common.i18n.Message("JAXB_EXCEPTION",