cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/9] cxf git commit: Avoid useless string concat when logs are disabled
Date Fri, 30 Oct 2015 15:33:03 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes ea7d7c750 -> ec5a2135a


Avoid useless string concat when logs are disabled


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

Branch: refs/heads/2.7.x-fixes
Commit: 1c9c358d476ad55e74626cd91499b3e7b61ce379
Parents: ea7d7c7
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Wed Jun 3 10:19:38 2015 +0200
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Oct 30 10:51:26 2015 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1c9c358d/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
index 17d6763..0516bec 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
@@ -34,6 +34,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -308,7 +309,9 @@ class JAXBContextInitializer extends ServiceModelVisitor {
             if (cls == null 
                 && ReflectionUtil.getDeclaredConstructors(claz).length > 0 
                 && !Modifier.isAbstract(claz.getModifiers())) {
-                LOG.info("Class " + claz.getName() + " does not have a default constructor
which JAXB requires.");
+                if (LOG.isLoggable(Level.INFO)) {
+                    LOG.info("Class " + claz.getName() + " does not have a default constructor
which JAXB requires.");
+                }
                 //there is no init(), but other constructors
                 Object factory = createFactory(claz, ReflectionUtil.getDeclaredConstructors(claz)[0]);
                 unmarshallerProperties.put("com.sun.xml.bind.ObjectFactory", factory);


Mime
View raw message