camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [camel] branch master updated: camel-core: remove unnecessary object array creation when logging with placeholders
Date Fri, 07 Sep 2018 07:15:05 GMT
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f1a3e2  camel-core: remove unnecessary object array creation when logging with placeholders
6f1a3e2 is described below

commit 6f1a3e202e5fce4619c1c6c208d6bb64d9a4889e
Author: Pascal Schumacher <pascalschumacher@gmx.net>
AuthorDate: Fri Sep 7 09:13:15 2018 +0200

    camel-core: remove unnecessary object array creation when logging with placeholders
---
 .../java/org/apache/camel/builder/xml/XPathBuilder.java  |  4 ++--
 .../camel/component/bean/AbstractBeanProcessor.java      |  2 +-
 .../org/apache/camel/component/bean/BeanComponent.java   |  2 +-
 .../java/org/apache/camel/component/bean/BeanInfo.java   |  2 +-
 .../java/org/apache/camel/component/bean/MethodInfo.java | 10 +++++-----
 .../org/apache/camel/component/file/FileOperations.java  |  2 +-
 .../apache/camel/component/file/GenericFileProducer.java |  2 +-
 .../org/apache/camel/component/mock/MockEndpoint.java    |  2 +-
 .../java/org/apache/camel/component/mock/TimeClause.java |  2 +-
 .../component/properties/DefaultPropertiesParser.java    |  2 +-
 .../org/apache/camel/component/seda/SedaComponent.java   |  2 +-
 .../org/apache/camel/component/seda/SedaConsumer.java    |  2 +-
 .../org/apache/camel/component/seda/SedaEndpoint.java    |  4 ++--
 .../org/apache/camel/converter/jaxp/XmlConverter.java    |  6 +++---
 .../java/org/apache/camel/impl/ConfigurationHelper.java  |  2 +-
 .../java/org/apache/camel/impl/DefaultCamelContext.java  | 16 ++++++++--------
 .../java/org/apache/camel/impl/DefaultComponent.java     |  2 +-
 .../org/apache/camel/impl/DefaultComponentResolver.java  |  2 +-
 .../camel/impl/DefaultPackageScanClassResolver.java      |  2 +-
 .../apache/camel/impl/DefaultStreamCachingStrategy.java  |  2 +-
 .../java/org/apache/camel/impl/DefaultUnitOfWork.java    |  4 ++--
 .../java/org/apache/camel/impl/FileStateRepository.java  |  2 +-
 .../camel/impl/InterceptSendToEndpointProcessor.java     |  2 +-
 .../main/java/org/apache/camel/impl/RouteService.java    |  2 +-
 .../org/apache/camel/impl/ScheduledPollConsumer.java     |  6 +++---
 .../apache/camel/impl/ThrottlingInflightRoutePolicy.java |  4 ++--
 .../main/java/org/apache/camel/impl/osgi/Activator.java  |  2 +-
 .../management/DefaultManagementLifecycleStrategy.java   |  2 +-
 .../camel/management/InstrumentationProcessor.java       |  2 +-
 .../org/apache/camel/management/MBeanInfoAssembler.java  |  2 +-
 .../apache/camel/model/ProcessorDefinitionHelper.java    |  4 ++--
 .../apache/camel/processor/CamelInternalProcessor.java   |  2 +-
 .../apache/camel/processor/RedeliveryErrorHandler.java   |  2 +-
 .../camel/processor/aggregate/AggregateProcessor.java    |  2 +-
 .../processor/aggregate/AggregationStrategyBeanInfo.java |  2 +-
 .../camel/processor/interceptor/BacklogTracer.java       |  2 +-
 .../validation/PredicateValidatingProcessor.java         |  2 +-
 .../apache/camel/support/XMLTokenExpressionIterator.java |  2 +-
 .../java/org/apache/camel/util/CamelContextHelper.java   |  6 +++---
 .../src/main/java/org/apache/camel/util/FileUtil.java    |  6 +++---
 .../java/org/apache/camel/util/IntrospectionSupport.java |  6 +++---
 .../util/concurrent/SizedScheduledExecutorService.java   |  2 +-
 .../org/apache/camel/impl/ConfigurationHelperTest.java   |  2 +-
 .../java/org/apache/camel/processor/ThrottlerTest.java   |  2 +-
 .../apache/camel/processor/ThrottlingGroupingTest.java   |  2 +-
 .../TypeConverterRegistryStatsPerformanceTest.java       | 10 +++++-----
 46 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
index 513cfc7..28c026d 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
@@ -1053,7 +1053,7 @@ public class XPathBuilder extends ServiceSupport implements CamelContextAware, E
         }
 
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Done evaluating exchange: {} as: {} with result: {}", new Object[] {exchange, resultQName, answer});
+            LOG.trace("Done evaluating exchange: {} as: {} with result: {}", exchange, resultQName, answer);
         }
         return answer;
     }
@@ -1366,7 +1366,7 @@ public class XPathBuilder extends ServiceSupport implements CamelContextAware, E
                 String uri = StringHelper.after(key, ":");
                 if (uri != null) {
                     factory = XPathFactory.newInstance(uri);
-                    LOG.info("Using system property {} with value {} when created default XPathFactory {}", new Object[] {key, uri, factory});
+                    LOG.info("Using system property {} with value {} when created default XPathFactory {}", key, uri, factory);
                 }
             }
         }
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
index 2cc7b9d..8e44bd9 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
@@ -145,7 +145,7 @@ public abstract class AbstractBeanProcessor implements AsyncProcessor {
             Class<?> clazz = beanInvoke.getMethod().getDeclaringClass();
             boolean sameBean = clazz.isInstance(bean);
             if (LOG.isDebugEnabled()) {
-                LOG.debug("BeanHolder bean: {} and beanInvocation bean: {} is same instance: {}", new Object[]{bean.getClass(), clazz, sameBean});
+                LOG.debug("BeanHolder bean: {} and beanInvocation bean: {} is same instance: {}", bean.getClass(), clazz, sameBean);
             }
             if (sameBean) {
                 try {
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java
index 46d95ef..c12320d 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java
@@ -76,7 +76,7 @@ public class BeanComponent extends UriEndpointComponent {
     protected void doShutdown() throws Exception {
         if (LOG.isDebugEnabled() && beanInfoCache instanceof LRUCache) {
             LRUCache cache = (LRUCache) this.beanInfoCache;
-            LOG.debug("Clearing BeanInfo cache[size={}, hits={}, misses={}, evicted={}]", new Object[]{cache.size(), cache.getHits(), cache.getMisses(), cache.getEvicted()});
+            LOG.debug("Clearing BeanInfo cache[size={}, hits={}, misses={}, evicted={}]", cache.size(), cache.getHits(), cache.getMisses(), cache.getEvicted());
         }
         beanInfoCache.clear();
     }
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
index 5dde40d..4dc9521 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
@@ -435,7 +435,7 @@ public class BeanInfo {
 
         int size = parameterTypes.length;
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Creating MethodInfo for class: {} method: {} having {} parameters", new Object[]{clazz, method, size});
+            LOG.trace("Creating MethodInfo for class: {} method: {} having {} parameters", clazz, method, size);
         }
 
         for (int i = 0; i < size; i++) {
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
index 5fbde08..1461b2c 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
@@ -295,7 +295,7 @@ public class MethodInfo {
 
                 // invoke pojo
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace(">>>> invoking: {} on bean: {} with arguments: {} for exchange: {}", new Object[]{method, pojo, asString(arguments), exchange});
+                    LOG.trace(">>>> invoking: {} on bean: {} with arguments: {} for exchange: {}", method, pojo, asString(arguments), exchange);
                 }
                 Object result = invoke(method, pojo, arguments, exchange);
 
@@ -800,11 +800,11 @@ public class MethodInfo {
                             // its a valid parameter value, so convert it to the expected type of the parameter
                             answer = exchange.getContext().getTypeConverter().mandatoryConvertTo(parameterType, exchange, parameterValue);
                             if (LOG.isTraceEnabled()) {
-                                LOG.trace("Parameter #{} evaluated as: {} type: ", new Object[]{index, answer, ObjectHelper.type(answer)});
+                                LOG.trace("Parameter #{} evaluated as: {} type: ", index, answer, ObjectHelper.type(answer));
                             }
                         } catch (Exception e) {
                             if (LOG.isDebugEnabled()) {
-                                LOG.debug("Cannot convert from type: {} to type: {} for parameter #{}", new Object[]{ObjectHelper.type(parameterValue), parameterType, index});
+                                LOG.debug("Cannot convert from type: {} to type: {} for parameter #{}", ObjectHelper.type(parameterValue), parameterType, index);
                             }
                             throw new ParameterBindingException(e, method, index, parameterType, parameterValue);
                         }
@@ -833,11 +833,11 @@ public class MethodInfo {
                         answer = exchange.getContext().getTypeConverter().mandatoryConvertTo(parameterType, result);
                     }
                     if (LOG.isTraceEnabled()) {
-                        LOG.trace("Parameter #{} evaluated as: {} type: ", new Object[]{index, answer, ObjectHelper.type(answer)});
+                        LOG.trace("Parameter #{} evaluated as: {} type: ", index, answer, ObjectHelper.type(answer));
                     }
                 } catch (NoTypeConversionAvailableException e) {
                     if (LOG.isDebugEnabled()) {
-                        LOG.debug("Cannot convert from type: {} to type: {} for parameter #{}", new Object[]{ObjectHelper.type(result), parameterType, index});
+                        LOG.debug("Cannot convert from type: {} to type: {} for parameter #{}", ObjectHelper.type(result), parameterType, index);
                     }
                     throw new ParameterBindingException(e, method, index, parameterType, result);
                 }
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java b/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
index b193293..c20b54e 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
@@ -418,7 +418,7 @@ public class FileOperations implements GenericFileOperations<File> {
             if (last != null) {
                 boolean result = file.setLastModified(last);
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace("Keeping last modified timestamp: {} on file: {} with result: {}", new Object[]{last, file, result});
+                    LOG.trace("Keeping last modified timestamp: {} on file: {} with result: {}", last, file, result);
                 }
             }
         }
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
index cc5cc33..d8aff51 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
@@ -299,7 +299,7 @@ public class GenericFileProducer<T> extends DefaultProducer {
 
         // upload
         if (log.isTraceEnabled()) {
-            log.trace("About to write [{}] to [{}] from exchange [{}]", new Object[]{fileName, getEndpoint(), exchange});
+            log.trace("About to write [{}] to [{}] from exchange [{}]", fileName, getEndpoint(), exchange);
         }
 
         boolean success = operations.storeFile(fileName, exchange, -1);
diff --git a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index acddf42..b89891a 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -1488,7 +1488,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
             List<Exchange> list = getReceivedExchanges();
             int index = 0;
             for (Exchange exchange : list) {
-                LOG.debug("{} failed and received[{}]: {}", new Object[]{getEndpointUri(), ++index, exchange});
+                LOG.debug("{} failed and received[{}]: {}", getEndpointUri(), ++index, exchange);
             }
         }
         throw new AssertionError(getEndpointUri() + " " + message);
diff --git a/camel-core/src/main/java/org/apache/camel/component/mock/TimeClause.java b/camel-core/src/main/java/org/apache/camel/component/mock/TimeClause.java
index 685aaa9..288b302 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/TimeClause.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/TimeClause.java
@@ -165,7 +165,7 @@ public class TimeClause extends BinaryPredicateSupport {
         }
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Evaluated time clause [{}] with current: {}, other: {} -> {}", new Object[]{toString(), currentDate, otherDate, answer});
+            LOG.debug("Evaluated time clause [{}] with current: {}, other: {} -> {}", toString(), currentDate, otherDate, answer);
         }
 
         return answer;
diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
index 0599815..24650be 100644
--- a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
+++ b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
@@ -228,7 +228,7 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper
                                     + " returned null value which is not allowed, from input: " + input);
                         } else {
                             if (log.isDebugEnabled()) {
-                                log.debug("Property with key [{}] applied by function [{}] -> {}", new Object[]{key, function.getName(), value});
+                                log.debug("Property with key [{}] applied by function [{}] -> {}", key, function.getName(), value);
                             }
                             return value;
                         }
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index d5697ad..1337215 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -151,7 +151,7 @@ public class SedaComponent extends UriEndpointComponent {
             ref.addReference(endpoint);
 
             if (log.isDebugEnabled()) {
-                log.debug("Reusing existing queue {} with size {} and reference count {}", new Object[]{key, size, ref.getCount()});
+                log.debug("Reusing existing queue {} with size {} and reference count {}", key, size, ref.getCount());
             }
             return ref;
         }
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
index b3c3191..bae2d20 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
@@ -200,7 +200,7 @@ public class SedaConsumer extends ServiceSupport implements Consumer, Runnable,
                 // use the end user configured poll timeout
                 exchange = queue.poll(pollTimeout, TimeUnit.MILLISECONDS);
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace("Polled queue {} with timeout {} ms. -> {}", new Object[]{ObjectHelper.getIdentityHashCode(queue), pollTimeout, exchange});
+                    LOG.trace("Polled queue {} with timeout {} ms. -> {}", ObjectHelper.getIdentityHashCode(queue), pollTimeout, exchange);
                 }
                 if (exchange != null) {
                     try {
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
index faa5fad..b6960bb 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
@@ -170,7 +170,7 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
                 QueueReference ref = getComponent().getOrCreateQueue(this, size, isMultipleConsumers(), queueFactory);
                 queue = ref.getQueue();
                 String key = getComponent().getQueueKey(getEndpointUri());
-                LOG.info("Endpoint {} is using shared queue: {} with size: {}", new Object[]{this, key, ref.getSize() !=  null ? ref.getSize() : Integer.MAX_VALUE});
+                LOG.info("Endpoint {} is using shared queue: {} with size: {}", this, key, ref.getSize() !=  null ? ref.getSize() : Integer.MAX_VALUE);
                 // and set the size we are using
                 if (ref.getSize() != null) {
                     setSize(ref.getSize());
@@ -178,7 +178,7 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
             } else {
                 // fallback and create queue (as this endpoint has no component)
                 queue = createQueue();
-                LOG.info("Endpoint {} is using queue: {} with size: {}", new Object[]{this, getEndpointUri(), getSize()});
+                LOG.info("Endpoint {} is using queue: {} with size: {}", this, getEndpointUri(), getSize());
             }
         }
         return queue;
diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
index 6e10053..37d5001 100644
--- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
+++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
@@ -1102,7 +1102,7 @@ public class XmlConverter {
                     factory.setFeature(uri, value);
                     features.add("feature " + uri + " value " + value);
                 } catch (ParserConfigurationException e) {
-                    LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", new Object[]{uri, value, e});
+                    LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", uri, value, e);
                 }
             }
         }
@@ -1211,7 +1211,7 @@ public class XmlConverter {
         try {
             factory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true);
         } catch (TransformerConfigurationException e) {
-            LOG.warn("TransformerFactory doesn't support the feature {} with value {}, due to {}.", new Object[]{javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, "true", e});
+            LOG.warn("TransformerFactory doesn't support the feature {} with value {}, due to {}.", javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, "true", e);
         }
         factory.setErrorListener(new XmlErrorListener());
         configureSaxonTransformerFactory(factory);
@@ -1264,7 +1264,7 @@ public class XmlConverter {
         try {
             sfactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true);
         } catch (Exception e) {
-            LOG.warn("SAXParser doesn't support the feature {} with value {}, due to {}.", new Object[]{javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, "true", e});
+            LOG.warn("SAXParser doesn't support the feature {} with value {}, due to {}.", javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, "true", e);
         }
         try {
             sfactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConfigurationHelper.java b/camel-core/src/main/java/org/apache/camel/impl/ConfigurationHelper.java
index 181fc66..42c856d 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConfigurationHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConfigurationHelper.java
@@ -121,7 +121,7 @@ public final class ConfigurationHelper {
                     || (anno.component().equals(EndpointConfiguration.URI_QUERY) && anno.parameter().equals(name))) { 
     
                     found = field;
-                    LOG.trace("Found field {}.{} as candidate for parameter {}", new Object[]{clazz.getName(), found.getName(), name});
+                    LOG.trace("Found field {}.{} as candidate for parameter {}", clazz.getName(), found.getName(), name);
                     return found;
                 }
             }
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index ab4272f..69670f0 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -707,7 +707,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                         }
 
                         if (answer != null && log.isDebugEnabled()) {
-                            log.debug("{} converted to endpoint: {} by component: {}", new Object[]{URISupport.sanitizeUri(uri), answer, component});
+                            log.debug("{} converted to endpoint: {} by component: {}", URISupport.sanitizeUri(uri), answer, component);
                         }
                     }
                 }
@@ -739,7 +739,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                         }
 
                         if (answer != null && log.isDebugEnabled()) {
-                            log.debug("{} converted to endpoint: {} by component: {}", new Object[]{URISupport.sanitizeUri(uri), answer, component});
+                            log.debug("{} converted to endpoint: {} by component: {}", URISupport.sanitizeUri(uri), answer, component);
                         }
                     }
 
@@ -1643,7 +1643,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
 
             ClassResolver resolver = getClassResolver();
             InputStream inputStream = resolver.loadResourceAsStream(path);
-            log.debug("Loading component JSON Schema for: {} using class resolver: {} -> {}", new Object[]{componentName, resolver, inputStream});
+            log.debug("Loading component JSON Schema for: {} using class resolver: {} -> {}", componentName, resolver, inputStream);
             if (inputStream != null) {
                 try {
                     return IOHelper.loadText(inputStream);
@@ -1685,7 +1685,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
 
             ClassResolver resolver = getClassResolver();
             InputStream inputStream = resolver.loadResourceAsStream(path);
-            log.debug("Loading dataformat JSON Schema for: {} using class resolver: {} -> {}", new Object[]{dataFormatName, resolver, inputStream});
+            log.debug("Loading dataformat JSON Schema for: {} using class resolver: {} -> {}", dataFormatName, resolver, inputStream);
             if (inputStream != null) {
                 try {
                     return IOHelper.loadText(inputStream);
@@ -1723,7 +1723,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
 
             ClassResolver resolver = getClassResolver();
             InputStream inputStream = resolver.loadResourceAsStream(path);
-            log.debug("Loading language JSON Schema for: {} using class resolver: {} -> {}", new Object[]{languageName, resolver, inputStream});
+            log.debug("Loading language JSON Schema for: {} using class resolver: {} -> {}", languageName, resolver, inputStream);
             if (inputStream != null) {
                 try {
                     return IOHelper.loadText(inputStream);
@@ -1746,7 +1746,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
             ClassResolver resolver = getClassResolver();
             InputStream inputStream = resolver.loadResourceAsStream(path);
             if (inputStream != null) {
-                log.debug("Loading eip JSON Schema for: {} using class resolver: {} -> {}", new Object[]{eipName, resolver, inputStream});
+                log.debug("Loading eip JSON Schema for: {} using class resolver: {} -> {}", eipName, resolver, inputStream);
                 try {
                     return IOHelper.loadText(inputStream);
                 } finally {
@@ -3281,7 +3281,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                     String replaced = resolvePropertyPlaceholders(value);
                     if (!value.equals(replaced)) {
                         if (log.isDebugEnabled()) {
-                            log.debug("Camel property with key {} replaced value from {} -> {}", new Object[]{key, value, replaced});
+                            log.debug("Camel property with key {} replaced value from {} -> {}", key, value, replaced);
                         }
                         entry.setValue(replaced);
                     }
@@ -3798,7 +3798,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
     protected void logRouteState(Route route, String state) {
         if (log.isInfoEnabled()) {
             if (route.getConsumer() != null) {
-                log.info("Route: {} is {}, was consuming from: {}", new Object[]{route.getId(), state, route.getConsumer().getEndpoint()});
+                log.info("Route: {} is {}, was consuming from: {}", route.getId(), state, route.getConsumer().getEndpoint());
             } else {
                 log.info("Route: {} is {}.", route.getId(), state);
             }
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
index 730d186..bcdbd95 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
@@ -121,7 +121,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone
             LOG.trace("Creating endpoint uri=[{}], path=[{}], parameters=[{}]", URISupport.sanitizeUri(uri), URISupport.sanitizePath(path), parameters);
         } else if (LOG.isDebugEnabled()) {
             // but at debug level only output sanitized uris
-            LOG.debug("Creating endpoint uri=[{}], path=[{}]", new Object[]{URISupport.sanitizeUri(uri), URISupport.sanitizePath(path)});
+            LOG.debug("Creating endpoint uri=[{}], path=[{}]", URISupport.sanitizeUri(uri), URISupport.sanitizePath(path));
         }
         Endpoint endpoint = createEndpoint(uri, path, parameters);
         if (endpoint == null) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponentResolver.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponentResolver.java
index bee54e4..e8044a5 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponentResolver.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponentResolver.java
@@ -65,7 +65,7 @@ public class DefaultComponentResolver implements ComponentResolver {
         }
 
         if (getLog().isDebugEnabled()) {
-            getLog().debug("Found component: {} via type: {} via: {}{}", new Object[]{name, type.getName(), factoryFinder.getResourcePath(), name});
+            getLog().debug("Found component: {} via type: {} via: {}{}", name, type.getName(), factoryFinder.getResourcePath(), name);
         }
 
         // create the component
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
index 1d698e9..34d8862 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
@@ -472,7 +472,7 @@ public class DefaultPackageScanClassResolver extends ServiceSupport implements P
             boolean found = false;
             for (ClassLoader classLoader : set) {
                 if (log.isTraceEnabled()) {
-                    log.trace("Testing for class {} matches criteria [{}] using classloader: {}", new Object[]{externalName, test, classLoader});
+                    log.trace("Testing for class {} matches criteria [{}] using classloader: {}", externalName, test, classLoader);
                 }
                 try {
                     Class<?> type = classLoader.loadClass(externalName);
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
index 00e7d10..112ec92 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
@@ -386,7 +386,7 @@ public class DefaultStreamCachingStrategy extends org.apache.camel.support.Servi
                     long u = heapUsage.getHeapMemoryUsage().getUsed();
                     long c = heapUsage.getHeapMemoryUsage().getCommitted();
                     long m = heapUsage.getHeapMemoryUsage().getMax();
-                    LOG.trace("Heap memory: [used={}M ({}%), committed={}M, max={}M]", new Object[]{u >> 20, percentage, c >> 20, m >> 20});
+                    LOG.trace("Heap memory: [used={}M ({}%), committed={}M, max={}M]", u >> 20, percentage, c >> 20, m >> 20);
                 }
 
                 if (percentage > spoolUsedHeapMemoryThreshold) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
index 3f48ac9..51af899 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
@@ -274,7 +274,7 @@ public class DefaultUnitOfWork implements UnitOfWork, Service {
     @Override
     public void beforeRoute(Exchange exchange, Route route) {
         if (log.isTraceEnabled()) {
-            log.trace("UnitOfWork beforeRoute: {} for ExchangeId: {} with {}", new Object[]{route.getId(), exchange.getExchangeId(), exchange});
+            log.trace("UnitOfWork beforeRoute: {} for ExchangeId: {} with {}", route.getId(), exchange.getExchangeId(), exchange);
         }
         UnitOfWorkHelper.beforeRouteSynchronizations(route, exchange, synchronizations, log);
     }
@@ -282,7 +282,7 @@ public class DefaultUnitOfWork implements UnitOfWork, Service {
     @Override
     public void afterRoute(Exchange exchange, Route route) {
         if (log.isTraceEnabled()) {
-            log.trace("UnitOfWork afterRoute: {} for ExchangeId: {} with {}", new Object[]{route.getId(), exchange.getExchangeId(), exchange});
+            log.trace("UnitOfWork afterRoute: {} for ExchangeId: {} with {}", route.getId(), exchange.getExchangeId(), exchange);
         }
         UnitOfWorkHelper.afterRouteSynchronizations(route, exchange, synchronizations, log);
     }
diff --git a/camel-core/src/main/java/org/apache/camel/impl/FileStateRepository.java b/camel-core/src/main/java/org/apache/camel/impl/FileStateRepository.java
index feda49c..398d7ca 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/FileStateRepository.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/FileStateRepository.java
@@ -144,7 +144,7 @@ public class FileStateRepository extends ServiceSupport implements StateReposito
      */
     private void appendToStore(String key, String value) {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Appending {}={} to state filestore: {}", new Object[]{key, value, fileStore});
+            LOG.debug("Appending {}={} to state filestore: {}", key, value, fileStore);
         }
         FileOutputStream fos = null;
         try {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpointProcessor.java b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpointProcessor.java
index 1808525..76a854b 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpointProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpointProcessor.java
@@ -69,7 +69,7 @@ public class InterceptSendToEndpointProcessor extends DefaultAsyncProducer {
     public boolean process(Exchange exchange, AsyncCallback callback) {
         // process the detour so we do the detour routing
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Sending to endpoint: {} is intercepted and detoured to: {} for exchange: {}", new Object[]{getEndpoint(), endpoint.getDetour(), exchange});
+            LOG.debug("Sending to endpoint: {} is intercepted and detoured to: {} for exchange: {}", getEndpoint(), endpoint.getDetour(), exchange);
         }
         // add header with the real endpoint uri
         exchange.getIn().setHeader(Exchange.INTERCEPTED_ENDPOINT, delegate.getEndpointUri());
diff --git a/camel-core/src/main/java/org/apache/camel/impl/RouteService.java b/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
index e5d545e..94e4b4f 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
@@ -374,7 +374,7 @@ public class RouteService extends ChildServiceSupport {
 
     protected void stopChildService(Route route, Set<Service> services, boolean shutdown) throws Exception {
         for (Service service : services) {
-            LOG.debug("{} child service on route: {} -> {}", new Object[]{shutdown ? "Shutting down" : "Stopping", route.getId(), service});
+            LOG.debug("{} child service on route: {} -> {}", shutdown ? "Shutting down" : "Stopping", route.getId(), service);
             if (service instanceof ErrorHandler) {
                 // special for error handlers
                 for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
index 8c6ef36..b19f707 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
@@ -133,9 +133,9 @@ public abstract class ScheduledPollConsumer extends DefaultConsumer implements R
             if (backoffCounter++ < backoffMultiplier) {
                 // yes we should backoff
                 if (idleCounter > 0) {
-                    LOG.debug("doRun() backoff due subsequent {} idles (backoff at {}/{})", new Object[]{idleCounter, backoffCounter, backoffMultiplier});
+                    LOG.debug("doRun() backoff due subsequent {} idles (backoff at {}/{})", idleCounter, backoffCounter, backoffMultiplier);
                 } else {
-                    LOG.debug("doRun() backoff due subsequent {} errors (backoff at {}/{})", new Object[]{errorCounter, backoffCounter, backoffMultiplier});
+                    LOG.debug("doRun() backoff due subsequent {} errors (backoff at {}/{})", errorCounter, backoffCounter, backoffMultiplier);
                 }
                 return;
             } else {
@@ -411,7 +411,7 @@ public abstract class ScheduledPollConsumer extends DefaultConsumer implements R
             if (backoffIdleThreshold <= 0 && backoffErrorThreshold <= 0) {
                 throw new IllegalArgumentException("backoffIdleThreshold and/or backoffErrorThreshold must be configured to a positive value when using backoffMultiplier");
             }
-            LOG.debug("Using backoff[multiplier={}, idleThreshold={}, errorThreshold={}] on {}", new Object[]{backoffMultiplier, backoffIdleThreshold, backoffErrorThreshold, getEndpoint()});
+            LOG.debug("Using backoff[multiplier={}, idleThreshold={}, errorThreshold={}] on {}", backoffMultiplier, backoffIdleThreshold, backoffErrorThreshold, getEndpoint());
         }
 
         if (scheduler == null) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ThrottlingInflightRoutePolicy.java b/camel-core/src/main/java/org/apache/camel/impl/ThrottlingInflightRoutePolicy.java
index f225abb..a81c831 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ThrottlingInflightRoutePolicy.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ThrottlingInflightRoutePolicy.java
@@ -110,7 +110,7 @@ public class ThrottlingInflightRoutePolicy extends RoutePolicySupport implements
         int size = getSize(route, exchange);
         boolean stop = maxInflightExchanges > 0 && size > maxInflightExchanges;
         if (log.isTraceEnabled()) {
-            log.trace("{} > 0 && {} > {} evaluated as {}", new Object[]{maxInflightExchanges, size, maxInflightExchanges, stop});
+            log.trace("{} > 0 && {} > {} evaluated as {}", maxInflightExchanges, size, maxInflightExchanges, stop);
         }
         if (stop) {
             try {
@@ -128,7 +128,7 @@ public class ThrottlingInflightRoutePolicy extends RoutePolicySupport implements
         size = getSize(route, exchange);
         boolean start = size <= resumeInflightExchanges;
         if (log.isTraceEnabled()) {
-            log.trace("{} <= {} evaluated as {}", new Object[]{size, resumeInflightExchanges, start});
+            log.trace("{} <= {} evaluated as {}", size, resumeInflightExchanges, start);
         }
         if (start) {
             try {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
index 0b1f915..e3dbf71 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
@@ -415,7 +415,7 @@ public class Activator implements BundleActivator, BundleTrackerCustomizer {
                 Set<String> packages = getConverterPackages(bundle.getEntry(META_INF_TYPE_CONVERTER));
 
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace("Found {} {} packages: {}", new Object[]{packages.size(), META_INF_TYPE_CONVERTER, packages});
+                    LOG.trace("Found {} {} packages: {}", packages.size(), META_INF_TYPE_CONVERTER, packages);
                 }
                 // if we only have camel-core on the classpath then we have already pre-loaded all its type converters
                 // but we exposed the "org.apache.camel.core" package in camel-core. This ensures there is at least one
diff --git a/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java b/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
index c19f47d..c35a58a 100644
--- a/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
@@ -259,7 +259,7 @@ public class DefaultManagementLifecycleStrategy extends ServiceSupport implement
             ObjectName on = getManagementStrategy().getManagementNamingStrategy().getObjectNameForCamelContext(newName, name);
             done = !getManagementStrategy().isManaged(mc, on);
             if (LOG.isTraceEnabled()) {
-                LOG.trace("Using name: {} in ObjectName[{}] exists? {}", new Object[]{name, on, done});
+                LOG.trace("Using name: {} in ObjectName[{}] exists? {}", name, on, done);
             }
         }
         return newName;
diff --git a/camel-core/src/main/java/org/apache/camel/management/InstrumentationProcessor.java b/camel-core/src/main/java/org/apache/camel/management/InstrumentationProcessor.java
index 92a1ae2..635cf61 100644
--- a/camel-core/src/main/java/org/apache/camel/management/InstrumentationProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/management/InstrumentationProcessor.java
@@ -99,7 +99,7 @@ public class InstrumentationProcessor extends DelegateAsyncProcessor implements
 
     protected void recordTime(Exchange exchange, long duration) {
         if (LOG.isTraceEnabled()) {
-            LOG.trace("{}Recording duration: {} millis for exchange: {}", new Object[]{type != null ? type + ": " : "", duration, exchange});
+            LOG.trace("{}Recording duration: {} millis for exchange: {}", type != null ? type + ": " : "", duration, exchange);
         }
 
         if (!exchange.isFailed() && exchange.getException() == null) {
diff --git a/camel-core/src/main/java/org/apache/camel/management/MBeanInfoAssembler.java b/camel-core/src/main/java/org/apache/camel/management/MBeanInfoAssembler.java
index 8413422..6cb394a 100644
--- a/camel-core/src/main/java/org/apache/camel/management/MBeanInfoAssembler.java
+++ b/camel-core/src/main/java/org/apache/camel/management/MBeanInfoAssembler.java
@@ -79,7 +79,7 @@ public class MBeanInfoAssembler implements Service {
         if (cache != null) {
             if (LOG.isDebugEnabled() && cache instanceof LRUCache) {
                 LRUCache cache = (LRUCache) this.cache;
-                LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", new Object[]{cache.size(), cache.getHits(), cache.getMisses(), cache.getEvicted()});
+                LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", cache.size(), cache.getHits(), cache.getMisses(), cache.getEvicted());
             }
             cache.clear();
         }
diff --git a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
index 12db486..cbbede4 100644
--- a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
@@ -743,7 +743,7 @@ public final class ProcessorDefinitionHelper {
                         }
                         changedProperties.put(name, value);
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("Changed property [{}] from: {} to: {}", new Object[]{name, value, text});
+                            LOG.debug("Changed property [{}] from: {} to: {}", name, value, text);
                         }
                     }
                 }
@@ -788,7 +788,7 @@ public final class ProcessorDefinitionHelper {
                             IntrospectionSupport.setProperty(definition, name, constant);
                             changedProperties.put(name, value);
                             if (LOG.isDebugEnabled()) {
-                                LOG.debug("Changed property [{}] from: {} to: {}", new Object[]{name, value, constant});
+                                LOG.debug("Changed property [{}] from: {} to: {}", name, value, constant);
                             }
                         } else {
                             throw new IllegalArgumentException("Constant field with name: " + field + " not found on Exchange.class");
diff --git a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
index df58543..b0f01e4 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
@@ -362,7 +362,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor {
 
         protected void recordTime(Exchange exchange, long duration) {
             if (LOG.isTraceEnabled()) {
-                LOG.trace("{}Recording duration: {} millis for exchange: {}", new Object[]{type != null ? type + ": " : "", duration, exchange});
+                LOG.trace("{}Recording duration: {} millis for exchange: {}", type != null ? type + ": " : "", duration, exchange);
             }
 
             if (!exchange.isFailed() && exchange.getException() == null) {
diff --git a/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java b/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
index 9072aef..96dcf6e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
@@ -188,7 +188,7 @@ public abstract class RedeliveryErrorHandler extends ErrorHandlerSupport impleme
             deliverToOnRedeliveryProcessor(exchange, data);
 
             if (log.isTraceEnabled()) {
-                log.trace("Redelivering exchangeId: {} -> {} for Exchange: {}", new Object[]{exchange.getExchangeId(), outputAsync, exchange});
+                log.trace("Redelivering exchangeId: {} -> {} for Exchange: {}", exchange.getExchangeId(), outputAsync, exchange);
             }
 
             // emmit event we are doing redelivery
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index f671941..c32d34a 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -548,7 +548,7 @@ public class AggregateProcessor extends ServiceSupport implements AsyncProcessor
     }
 
     protected void doAggregationRepositoryAdd(CamelContext camelContext, String key, Exchange oldExchange, Exchange newExchange) {
-        LOG.trace("In progress aggregated oldExchange: {}, newExchange: {} with correlation key: {}", new Object[]{oldExchange, newExchange, key});
+        LOG.trace("In progress aggregated oldExchange: {}, newExchange: {} with correlation key: {}", oldExchange, newExchange, key);
         if (optimisticLocking) {
             try {
                 ((OptimisticLockingAggregationRepository)aggregationRepository).add(camelContext, key, oldExchange, newExchange);
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
index 7e060e7..f9b5215 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
@@ -54,7 +54,7 @@ public class AggregationStrategyBeanInfo {
 
         int size = parameterTypes.length;
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Creating MethodInfo for class: {} method: {} having {} parameters", new Object[]{type, method, size});
+            LOG.trace("Creating MethodInfo for class: {} method: {} having {} parameters", type, method, size);
         }
 
         // must have equal number of parameters
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogTracer.java b/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogTracer.java
index be4861e..72d3964 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogTracer.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogTracer.java
@@ -123,7 +123,7 @@ public final class BacklogTracer extends ServiceSupport implements InterceptStra
         }
 
         if (LOG.isTraceEnabled()) {
-            LOG.trace("Should trace evaluated {} -> pattern: {}, filter: {}", new Object[]{definition.getId(), pattern, filter});
+            LOG.trace("Should trace evaluated {} -> pattern: {}, filter: {}", definition.getId(), pattern, filter);
         }
         return pattern && filter;
     }
diff --git a/camel-core/src/main/java/org/apache/camel/processor/validation/PredicateValidatingProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/validation/PredicateValidatingProcessor.java
index f5b8d6e..3957531 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/validation/PredicateValidatingProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/validation/PredicateValidatingProcessor.java
@@ -45,7 +45,7 @@ public class PredicateValidatingProcessor extends ServiceSupport implements Proc
         boolean matches = predicate.matches(exchange);
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Validation {} for {} with Predicate[{}]", new Object[]{matches ? "succeed" : "failed", exchange, predicate});
+            LOG.debug("Validation {} for {} with Predicate[{}]", matches ? "succeed" : "failed", exchange, predicate);
         }
 
         if (!matches) {
diff --git a/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java b/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java
index 85d4f5e..bdcfc87 100644
--- a/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java
+++ b/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java
@@ -465,7 +465,7 @@ public class XMLTokenExpressionIterator extends ExpressionAdapter implements Nam
                     depth++;
                     QName name = reader.getName();
                     if (LOG.isTraceEnabled()) {
-                        LOG.trace("se={}; depth={}; trackdepth={}", new Object[]{name, depth, trackdepth});
+                        LOG.trace("se={}; depth={}; trackdepth={}", name, depth, trackdepth);
                     }
                     
                     String token = getCurrentText();
diff --git a/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java b/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
index bb9bd7e..5728e83 100644
--- a/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
@@ -508,7 +508,7 @@ public final class CamelContextHelper {
      */
     public static SortedMap<String, Properties> findComponents(CamelContext camelContext) throws LoadPropertiesException {
         ClassResolver resolver = camelContext.getClassResolver();
-        LOG.debug("Finding all components using class resolver: {} -> {}", new Object[]{resolver});
+        LOG.debug("Finding all components using class resolver: {} -> {}", resolver);
         Enumeration<URL> iter = resolver.loadAllResourcesAsURL(COMPONENT_DESCRIPTOR);
         return findComponents(camelContext, iter);
     }
@@ -611,7 +611,7 @@ public final class CamelContextHelper {
         SortedMap<String, Properties> answer = new TreeMap<>();
 
         ClassResolver resolver = camelContext.getClassResolver();
-        LOG.debug("Finding all EIPs using class resolver: {} -> {}", new Object[]{resolver});
+        LOG.debug("Finding all EIPs using class resolver: {} -> {}", resolver);
         URL url = resolver.loadResourceAsURL(MODEL_DESCRIPTOR);
         if (url != null) {
             InputStream is = null;
@@ -787,7 +787,7 @@ public final class CamelContextHelper {
                         }
                         changedProperties.put(name, value);
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("Changed property [{}] from: {} to: {}", new Object[]{name, value, text});
+                            LOG.debug("Changed property [{}] from: {} to: {}", name, value, text);
                         }
                     }
                 }
diff --git a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
index d1782e0..632ab0b 100644
--- a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
+++ b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
@@ -470,7 +470,7 @@ public final class FileUtil {
         int count = 0;
         while (!renamed && count < 3) {
             if (LOG.isDebugEnabled() && count > 0) {
-                LOG.debug("Retrying attempt {} to rename file from: {} to: {}", new Object[]{count, from, to});
+                LOG.debug("Retrying attempt {} to rename file from: {} to: {}", count, from, to);
             }
 
             renamed = from.renameTo(to);
@@ -493,7 +493,7 @@ public final class FileUtil {
         }
 
         if (LOG.isDebugEnabled() && count > 0) {
-            LOG.debug("Tried {} to rename file: {} to: {} with result: {}", new Object[]{count, from, to, renamed});
+            LOG.debug("Tried {} to rename file: {} to: {} with result: {}", count, from, to, renamed);
         }
         return renamed;
     }
@@ -568,7 +568,7 @@ public final class FileUtil {
 
 
         if (LOG.isDebugEnabled() && count > 0) {
-            LOG.debug("Tried {} to delete file: {} with result: {}", new Object[]{count, file, deleted});
+            LOG.debug("Tried {} to delete file: {} with result: {}", count, file, deleted);
         }
         return deleted;
     }
diff --git a/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java b/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
index 98f47b3..790873d 100644
--- a/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
@@ -134,7 +134,7 @@ public final class IntrospectionSupport {
     public static void stop() {
         if (LOG.isDebugEnabled() && CACHE instanceof LRUCache) {
             LRUCache localCache = (LRUCache) IntrospectionSupport.CACHE;
-            LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", new Object[]{localCache.size(), localCache.getHits(), localCache.getMisses(), localCache.getEvicted()});
+            LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", localCache.size(), localCache.getHits(), localCache.getMisses(), localCache.getEvicted());
         }
         CACHE.clear();
 
@@ -566,7 +566,7 @@ public final class IntrospectionSupport {
                             if (SECRETS.matcher(name).find()) {
                                 val = "xxxxxx";
                             }
-                            LOG.trace("Configured property: {} on bean: {} with value: {}", new Object[]{name, target, val});
+                            LOG.trace("Configured property: {} on bean: {} with value: {}", name, target, val);
                         }
                         return true;
                     } else {
@@ -581,7 +581,7 @@ public final class IntrospectionSupport {
                             if (SECRETS.matcher(name).find()) {
                                 val = "xxxxxx";
                             }
-                            LOG.trace("Configured property: {} on bean: {} with value: {}", new Object[]{name, target, val});
+                            LOG.trace("Configured property: {} on bean: {} with value: {}", name, target, val);
                         }
                         return true;
                     }
diff --git a/camel-core/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java b/camel-core/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
index 57dd06d..f5f0186 100644
--- a/camel-core/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
+++ b/camel-core/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
@@ -296,7 +296,7 @@ public class SizedScheduledExecutorService implements ScheduledExecutorService {
         int size = delegate.getQueue().size();
         boolean answer = size < queueSize;
         if (LOG.isTraceEnabled()) {
-            LOG.trace("canScheduleOrExecute {} < {} -> {}", new Object[]{size, queueSize, answer});
+            LOG.trace("canScheduleOrExecute {} < {} -> {}", size, queueSize, answer);
         }
         return answer;
     }
diff --git a/camel-core/src/test/java/org/apache/camel/impl/ConfigurationHelperTest.java b/camel-core/src/test/java/org/apache/camel/impl/ConfigurationHelperTest.java
index d31f956..bb0471f 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/ConfigurationHelperTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/ConfigurationHelperTest.java
@@ -213,7 +213,7 @@ public class ConfigurationHelperTest {
         if (anno != null) {
             LOG.info("  @URIField(component = \"{}\", parameter = \"{}\")", anno.component(), anno.parameter());
         }
-        LOG.info("  {} {}={}", new Object[] {field.getType().getName(), field.getName(), config.getParameter(field.getName())});
+        LOG.info("  {} {}={}", field.getType().getName(), field.getName(), config.getParameter(field.getName()));
     }
 
     private static class ConfiguredComponent implements Component {
diff --git a/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java b/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java
index 7c3ce0c..ceb4c74 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java
@@ -147,7 +147,7 @@ public class ThrottlerTest extends ContextTestSupport {
         long maximum = calculateMaximum(intervalMs, throttle, messageCount) + 50;
         // add 500 in case running on slow CI boxes
         maximum += 500;
-        log.info("Sent {} exchanges in {}ms, with throttle rate of {} per {}ms. Calculated min {}ms and max {}ms", new Object[]{messageCount, elapsedTimeMs, throttle, intervalMs, minimum, maximum});
+        log.info("Sent {} exchanges in {}ms, with throttle rate of {} per {}ms. Calculated min {}ms and max {}ms", messageCount, elapsedTimeMs, throttle, intervalMs, minimum, maximum);
 
         assertTrue("Should take at least " + minimum + "ms, was: " + elapsedTimeMs, elapsedTimeMs >= minimum);
         assertTrue("Should take at most " + maximum + "ms, was: " + elapsedTimeMs, elapsedTimeMs <= maximum + TOLERANCE);
diff --git a/camel-core/src/test/java/org/apache/camel/processor/ThrottlingGroupingTest.java b/camel-core/src/test/java/org/apache/camel/processor/ThrottlingGroupingTest.java
index 4c1e30c..5b16223 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/ThrottlingGroupingTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/ThrottlingGroupingTest.java
@@ -99,7 +99,7 @@ public class ThrottlingGroupingTest extends ContextTestSupport {
         long maximum = calculateMaximum(intervalMs, throttle, messageCount) + 50;
         // add 500 in case running on slow CI boxes
         maximum += 500;
-        log.info("Sent {} exchanges in {}ms, with throttle rate of {} per {}ms. Calculated min {}ms and max {}ms", new Object[]{messageCount, elapsedTimeMs, throttle, intervalMs, minimum, maximum});
+        log.info("Sent {} exchanges in {}ms, with throttle rate of {} per {}ms. Calculated min {}ms and max {}ms", messageCount, elapsedTimeMs, throttle, intervalMs, minimum, maximum);
 
         assertTrue("Should take at least " + minimum + "ms, was: " + elapsedTimeMs, elapsedTimeMs >= minimum);
         assertTrue("Should take at most " + maximum + "ms, was: " + elapsedTimeMs, elapsedTimeMs <= maximum + TOLERANCE);
diff --git a/camel-core/src/test/java/org/apache/camel/processor/TypeConverterRegistryStatsPerformanceTest.java b/camel-core/src/test/java/org/apache/camel/processor/TypeConverterRegistryStatsPerformanceTest.java
index 6d57049..98a7362 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/TypeConverterRegistryStatsPerformanceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/TypeConverterRegistryStatsPerformanceTest.java
@@ -57,11 +57,11 @@ public class TypeConverterRegistryStatsPerformanceTest extends ContextTestSuppor
         long hit2 = context.getTypeConverterRegistry().getStatistics().getHitCounter();
         long miss2 = context.getTypeConverterRegistry().getStatistics().getMissCounter();
 
-        log.info("Noop: before={}, after={}, delta={}", new Object[]{noop, noop2, noop2 - noop});
-        log.info("Attempt: before={}, after={}, delta={}", new Object[]{attempt, attempt2, attempt2 - attempt});
-        log.info("Failed: before={}, after={}, delta={}", new Object[]{failed, failed2, failed2 - failed});
-        log.info("Hit: before={}, after={}, delta={}", new Object[]{hit, hit2, hit2 - hit});
-        log.info("Miss: before={}, after={}, delta={}", new Object[]{miss, miss2, miss2 - miss});
+        log.info("Noop: before={}, after={}, delta={}", noop, noop2, noop2 - noop);
+        log.info("Attempt: before={}, after={}, delta={}", attempt, attempt2, attempt2 - attempt);
+        log.info("Failed: before={}, after={}, delta={}", failed, failed2, failed2 - failed);
+        log.info("Hit: before={}, after={}, delta={}", hit, hit2, hit2 - hit);
+        log.info("Miss: before={}, after={}, delta={}", miss, miss2, miss2 - miss);
     }
 
     protected RouteBuilder createRouteBuilder() {


Mime
View raw message