cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject [1/2] cxf git commit: Avoid useless string concat when logs are disabled
Date Wed, 03 Jun 2015 08:23:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes ad7a25af9 -> 4fec41d97


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

Branch: refs/heads/3.0.x-fixes
Commit: adef6b90d25558a05b84b02b794ddbcf3534e0ab
Parents: ad7a25a
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Wed Jun 3 10:19:38 2015 +0200
Committer: Alessio Soldano <asoldano@redhat.com>
Committed: Wed Jun 3 10:21:46 2015 +0200

----------------------------------------------------------------------
 .../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/adef6b90/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 afde3f4..902d0a8 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;
@@ -309,7 +310,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