cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cxf git commit: [CXF-7442] proper logging instead of printStackTrace
Date Wed, 12 Jul 2017 10:55:10 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1387abab6 -> b936edac5


[CXF-7442] proper logging instead of printStackTrace


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b936edac
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b936edac
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b936edac

Branch: refs/heads/master
Commit: b936edac5170d959fc1b17550d3b83f3a1f5fbdc
Parents: 1387aba
Author: Dennis Kieselhorst <deki@apache.org>
Authored: Wed Jul 12 12:54:57 2017 +0200
Committer: Dennis Kieselhorst <deki@apache.org>
Committed: Wed Jul 12 12:54:57 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/jaxrs/utils/JAXBUtils.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b936edac/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXBUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXBUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXBUtils.java
index e505d27..e41aa72 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXBUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXBUtils.java
@@ -22,12 +22,18 @@ import java.io.Closeable;
 import java.io.IOException;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
+import org.apache.cxf.common.logging.LogUtils;
+
 public final class JAXBUtils {
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXBUtils.class);
+
     private JAXBUtils() {
 
     }
@@ -132,7 +138,7 @@ public final class JAXBUtils {
                     return xmlAdapter.unmarshal(obj);
                 }
             } catch (Exception ex) {
-                ex.printStackTrace();
+                LOG.log(Level.INFO, "(un)marshalling failed, using defaultValue", ex);
             }
         }
         return defaultValue;


Mime
View raw message