cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
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 GMT
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 <sberyozkin@gmail.com>
Authored: Sun Jul 31 15:20:35 2016 +0300
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
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<T> 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", 


Mime
View raw message