cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [05/16] cxf git commit: [CXF-6983] Avoiding the error message duplication, patch from Mike Golod applied, This closes #148
Date Mon, 01 Aug 2016 02:19:31 GMT
[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/524cf800
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/524cf800
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/524cf800

Branch: refs/heads/master-jaxrs-2.1
Commit: 524cf8002bbbfd179c28bf8c3f9963e61fca9f21
Parents: 45d54d5
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:20:35 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/524cf800/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