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:24:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 02d5fa907 -> bd9c6bfad


[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/bd9c6bfa
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bd9c6bfa
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bd9c6bfa

Branch: refs/heads/3.0.x-fixes
Commit: bd9c6bfad97d705f36090347472ec410900be4b7
Parents: 02d5fa9
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:24:00 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/bd9c6bfa/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 b456916..64a1e07 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