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: Remove #toString calls on arguments of parameterized log messages.
Date Mon, 10 Sep 2018 18:52:20 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 f320837  Remove #toString calls on arguments of parameterized log messages.
f320837 is described below

commit f320837fe9eb7589c2c506b4638c131db490d17b
Author: Pascal Schumacher <pascalschumacher@gmx.net>
AuthorDate: Mon Sep 10 20:52:00 2018 +0200

    Remove #toString calls on arguments of parameterized log messages.
---
 .../main/java/org/apache/camel/builder/xml/XPathBuilder.java |  4 ++--
 .../java/org/apache/camel/converter/jaxp/XmlConverter.java   |  2 +-
 .../org/apache/camel/impl/DefaultStreamCachingStrategy.java  |  8 ++++----
 .../test/java/org/apache/camel/impl/CustomIdFactoryTest.java |  2 +-
 .../java/org/apache/camel/component/aws/ec2/EC2Producer.java |  2 +-
 .../org/apache/camel/blueprint/BlueprintCamelContext.java    |  4 ++--
 .../main/java/org/apache/camel/component/cm/CMProducer.java  |  6 +++---
 .../java/org/apache/camel/component/cxf/CxfProducer.java     |  2 +-
 .../consumer/DropboxScheduledPollGetConsumer.java            |  2 +-
 .../consumer/DropboxScheduledPollSearchConsumer.java         |  2 +-
 .../dropbox/integration/producer/DropboxGetProducer.java     |  2 +-
 .../dropbox/integration/producer/DropboxPutProducer.java     |  2 +-
 .../java/org/apache/camel/component/hdfs/HdfsConsumer.java   | 12 ++++++------
 .../java/org/apache/camel/component/hdfs/HdfsProducer.java   |  8 ++++----
 .../java/org/apache/camel/component/hdfs2/HdfsConsumer.java  | 12 ++++++------
 .../java/org/apache/camel/component/hdfs2/HdfsProducer.java  |  8 ++++----
 .../java/org/apache/camel/component/http/HttpProducer.java   |  2 +-
 .../java/org/apache/camel/component/http4/HttpProducer.java  |  2 +-
 .../camel/test/junit/rule/mllp/MllpServerResource.java       |  6 +++---
 .../camel/component/mongodb/gridfs/GridFsEndpoint.java       |  2 +-
 .../org/apache/camel/component/mongodb/MongoDbEndpoint.java  |  2 +-
 .../org/apache/camel/component/mongodb3/MongoDbEndpoint.java |  2 +-
 .../apache/camel/component/olingo2/Olingo2AppAPITest.java    |  4 ++--
 .../apache/camel/component/olingo2/Olingo2ComponentTest.java |  2 +-
 .../apache/camel/component/olingo4/Olingo4AppAPITest.java    |  4 ++--
 .../apache/camel/component/olingo4/Olingo4ComponentTest.java |  2 +-
 .../camel/component/restlet/DefaultRestletBinding.java       |  2 +-
 .../component/salesforce/StreamingApiIntegrationTest.java    |  2 +-
 .../org/apache/camel/component/syslog/SyslogConverter.java   |  2 +-
 29 files changed, 56 insertions(+), 56 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 28c026d..ae1f3e1 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
@@ -1076,9 +1076,9 @@ public class XPathBuilder extends ServiceSupport implements CamelContextAware,
E
         XPath xPath = getXPathFactory().newXPath();
 
         if (!logNamespaces && LOG.isTraceEnabled()) {
-            LOG.trace("Creating new XPath expression in pool. Namespaces on XPath expression:
{}", getNamespaceContext().toString());
+            LOG.trace("Creating new XPath expression in pool. Namespaces on XPath expression:
{}", getNamespaceContext());
         } else if (logNamespaces && LOG.isInfoEnabled()) {
-            LOG.info("Creating new XPath expression in pool. Namespaces on XPath expression:
{}", getNamespaceContext().toString());
+            LOG.info("Creating new XPath expression in pool. Namespaces on XPath expression:
{}", getNamespaceContext());
         }
         xPath.setNamespaceContext(getNamespaceContext());
         xPath.setXPathVariableResolver(getVariableResolver());
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 37d5001..93d3581 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
@@ -1115,7 +1115,7 @@ public class XmlConverter {
                 }
                 featureString.append(feature);
             }
-            LOG.info("DocumentBuilderFactory has been set with features {{}}.", featureString.toString());
+            LOG.info("DocumentBuilderFactory has been set with features {{}}.", featureString);
         }
 
     }
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 112ec92..fbedac5 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
@@ -310,12 +310,12 @@ public class DefaultStreamCachingStrategy extends org.apache.camel.support.Servi
             }
         }
 
-        LOG.debug("StreamCaching configuration {}", this.toString());
+        LOG.debug("StreamCaching configuration {}", this);
 
         if (spoolDirectory != null) {
-            LOG.info("StreamCaching in use with spool directory: {} and rules: {}", spoolDirectory.getPath(),
spoolRules.toString());
+            LOG.info("StreamCaching in use with spool directory: {} and rules: {}", spoolDirectory.getPath(),
spoolRules);
         } else {
-            LOG.info("StreamCaching in use with rules: {}", spoolRules.toString());
+            LOG.info("StreamCaching in use with rules: {}", spoolRules);
         }
     }
 
@@ -327,7 +327,7 @@ public class DefaultStreamCachingStrategy extends org.apache.camel.support.Servi
         }
 
         if (LOG.isDebugEnabled() && statistics.isStatisticsEnabled()) {
-            LOG.debug("Stopping StreamCachingStrategy with statistics: {}", statistics.toString());
+            LOG.debug("Stopping StreamCachingStrategy with statistics: {}", statistics);
         }
 
         statistics.reset();
diff --git a/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java b/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
index 0cc8091..234c17c 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
@@ -122,7 +122,7 @@ public class CustomIdFactoryTest extends ContextTestSupport {
             return new DelegateProcessor(target) {
                 @Override
                 protected void processNext(Exchange exchange) throws Exception {
-                    LOG.debug("Debugging at: {} with id: {} with exchange: {}", definition.toString(),
definition.getId(), exchange);
+                    LOG.debug("Debugging at: {} with id: {} with exchange: {}", definition,
definition.getId(), exchange);
 
                     // record the path taken at runtime
                     ids += definition.getId();
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java
index 8053c16..505c689 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java
@@ -202,7 +202,7 @@ public class EC2Producer extends DefaultProducer {
             LOG.trace("Run Instances command returned the error code {}", ase.getErrorCode());
             throw ase;
         }
-        LOG.trace("Creating and running instances with ami [{}] and instance type {}", ami,
instanceType.toString());
+        LOG.trace("Creating and running instances with ami [{}] and instance type {}", ami,
instanceType);
         Message message = getMessageForResponse(exchange);
         message.setBody(result);
     }
diff --git a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
index fe3e3ad..cea760d 100644
--- a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
+++ b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
@@ -167,7 +167,7 @@ public class BlueprintCamelContext extends DefaultCamelContext implements
Servic
                 break;
             }
 
-            LOG.debug("Received BlueprintEvent[replay={} type={} bundle={}] %s", event.isReplay(),
eventTypeString, event.getBundle().getSymbolicName(), event.toString());
+            LOG.debug("Received BlueprintEvent[replay={} type={} bundle={}] %s", event.isReplay(),
eventTypeString, event.getBundle().getSymbolicName(), event);
         }
 
         if (!event.isReplay() && this.getBundleContext().getBundle().getBundleId()
== event.getBundle().getBundleId()) {
@@ -213,7 +213,7 @@ public class BlueprintCamelContext extends DefaultCamelContext implements
Servic
             }
 
             // use trace logging as this is very noisy
-            LOG.trace("Service: {} changed to: {}", event.toString(), eventTypeString);
+            LOG.trace("Service: {} changed to: {}", event, eventTypeString);
         }
     }
 
diff --git a/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMProducer.java
b/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMProducer.java
index e4f5722..33e0f1c 100644
--- a/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMProducer.java
+++ b/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMProducer.java
@@ -58,7 +58,7 @@ public class CMProducer extends DefaultProducer {
         final SMSMessage smsMessage = exchange.getIn().getMandatoryBody(SMSMessage.class);
 
         // Validates Payload - SMSMessage
-        log.trace("Validating SMSMessage instance provided: {}", smsMessage.toString());
+        log.trace("Validating SMSMessage instance provided: {}", smsMessage);
         final Set<ConstraintViolation<SMSMessage>> constraintViolations = getValidator().validate(smsMessage);
         if (constraintViolations.size() > 0) {
             final StringBuffer msg = new StringBuffer();
@@ -68,7 +68,7 @@ public class CMProducer extends DefaultProducer {
             log.debug(msg.toString());
             throw new InvalidPayloadRuntimeException(exchange, SMSMessage.class);
         }
-        log.trace("SMSMessage instance is valid: {}", smsMessage.toString());
+        log.trace("SMSMessage instance is valid: {}", smsMessage);
 
         // We have a valid (immutable) SMSMessage instance, lets extend to
         // CMMessage
@@ -93,7 +93,7 @@ public class CMProducer extends DefaultProducer {
         //  for abnormal situations.
         sender.send(cmMessage);
 
-        log.debug("Request accepted by CM Host: {}", cmMessage.toString());
+        log.debug("Request accepted by CM Host: {}", cmMessage);
     }
 
     @Override
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
index e51ebd0..3e02d69 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
@@ -419,7 +419,7 @@ public class CxfProducer extends DefaultProducer implements AsyncProcessor
{
 
             QName qname = new QName(ns, lp);
 
-            LOG.trace("Operation qname = {}", qname.toString());
+            LOG.trace("Operation qname = {}", qname);
             
             answer = client.getEndpoint().getEndpointInfo().getBinding().getOperation(qname);
             if (answer == null) {
diff --git a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollGetConsumer.java
b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollGetConsumer.java
index 406ee6f..88def5c 100644
--- a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollGetConsumer.java
+++ b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollGetConsumer.java
@@ -59,7 +59,7 @@ public class DropboxScheduledPollGetConsumer extends DropboxScheduledPollConsume
         }
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Downloaded: {}", result.toString());
+            LOG.debug("Downloaded: {}", result);
         }
 
         try {
diff --git a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollSearchConsumer.java
b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollSearchConsumer.java
index 36e04a4..30fbec9 100644
--- a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollSearchConsumer.java
+++ b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/consumer/DropboxScheduledPollSearchConsumer.java
@@ -51,7 +51,7 @@ public class DropboxScheduledPollSearchConsumer extends DropboxScheduledPollCons
         exchange.getIn().setBody(result.getFound());
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Downloaded: {}", result.toString());
+            LOG.debug("Downloaded: {}", result);
         }
 
         try {
diff --git a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxGetProducer.java
b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxGetProducer.java
index 1836bdf..5f09757 100644
--- a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxGetProducer.java
+++ b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxGetProducer.java
@@ -58,7 +58,7 @@ public class DropboxGetProducer extends DropboxProducer {
             exchange.getIn().setHeader(DropboxResultHeader.DOWNLOADED_FILES.name(), pathsExtracted.toString());
             exchange.getIn().setBody(map);
         }
-        LOG.debug("Downloaded: {}", result.toString());
+        LOG.debug("Downloaded: {}", result);
     }
 
 }
diff --git a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxPutProducer.java
b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxPutProducer.java
index e706e71..ff64b91 100644
--- a/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxPutProducer.java
+++ b/components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/integration/producer/DropboxPutProducer.java
@@ -66,7 +66,7 @@ public class DropboxPutProducer extends DropboxProducer {
         }
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Uploaded: {}", result.toString());
+            LOG.debug("Uploaded: {}", result);
         }
     }
 
diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
index ac15bff..d2c2032 100644
--- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
+++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConsumer.java
@@ -70,10 +70,10 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
     private HdfsInfo setupHdfs(boolean onStartup) throws Exception {
         // if we are starting up then log at info level, and if runtime then log at debug
level to not flood the log
         if (onStartup) {
-            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath.toString());
+            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath.toString());
+                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath);
             }
         }
 
@@ -81,10 +81,10 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
         HdfsInfo answer = HdfsInfoFactory.newHdfsInfo(this.hdfsPath.toString());
 
         if (onStartup) {
-            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
hdfsPath.toString());
+            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
hdfsPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), hdfsPath.toString());
+                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), hdfsPath);
             }
         }
         return answer;
@@ -129,7 +129,7 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
                 // must match owner
                 if (!config.getOwner().equals(status.getOwner())) {
                     if (log.isDebugEnabled()) {
-                        log.debug("Skipping file: {} as not matching owner: {}", status.getPath().toString(),
config.getOwner());
+                        log.debug("Skipping file: {} as not matching owner: {}", status.getPath(),
config.getOwner());
                     }
                     continue;
                 }
@@ -140,7 +140,7 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
                 this.istream = HdfsInputStream.createInputStream(status.getPath().toString(),
this.config);
                 if (!this.istream.isOpened()) {
                     if (log.isDebugEnabled()) {
-                        log.debug("Skipping file: {} because it doesn't exist anymore", status.getPath().toString());
+                        log.debug("Skipping file: {} because it doesn't exist anymore", status.getPath());
                     }
                     continue;
                 }
diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsProducer.java
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsProducer.java
index f22cdfd..27a39c9 100644
--- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsProducer.java
+++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsProducer.java
@@ -133,20 +133,20 @@ public class HdfsProducer extends DefaultProducer {
 
         // if we are starting up then log at info level, and if runtime then log at debug
level to not flood the log
         if (onStartup) {
-            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath.toString());
+            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath.toString());
+                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath);
             }
         }
 
         HdfsOutputStream answer = HdfsOutputStream.createOutputStream(actualPath.toString(),
config);
 
         if (onStartup) {
-            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
actualPath.toString());
+            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
actualPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), actualPath.toString());
+                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), actualPath);
             }
         }
 
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
index 2236e62..3711eb4 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConsumer.java
@@ -69,10 +69,10 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
     private HdfsInfo setupHdfs(boolean onStartup) throws Exception {
         // if we are starting up then log at info level, and if runtime then log at debug
level to not flood the log
         if (onStartup) {
-            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath.toString());
+            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath.toString());
+                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), hdfsPath);
             }
         }
 
@@ -80,10 +80,10 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
         HdfsInfo answer = HdfsInfoFactory.newHdfsInfo(this.hdfsPath.toString());
 
         if (onStartup) {
-            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
hdfsPath.toString());
+            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
hdfsPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), hdfsPath.toString());
+                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), hdfsPath);
             }
         }
         return answer;
@@ -128,7 +128,7 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
                 // must match owner
                 if (!config.getOwner().equals(status.getOwner())) {
                     if (log.isDebugEnabled()) {
-                        log.debug("Skipping file: {} as not matching owner: {}", status.getPath().toString(),
config.getOwner());
+                        log.debug("Skipping file: {} as not matching owner: {}", status.getPath(),
config.getOwner());
                     }
                     continue;
                 }
@@ -139,7 +139,7 @@ public final class HdfsConsumer extends ScheduledPollConsumer {
                 this.istream = HdfsInputStream.createInputStream(status.getPath().toString(),
this.config);
                 if (!this.istream.isOpened()) {
                     if (log.isDebugEnabled()) {
-                        log.debug("Skipping file: {} because it doesn't exist anymore", status.getPath().toString());
+                        log.debug("Skipping file: {} because it doesn't exist anymore", status.getPath());
                     }
                     continue;
                 }
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsProducer.java
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsProducer.java
index 778b7f9..e541cb9 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsProducer.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsProducer.java
@@ -133,20 +133,20 @@ public class HdfsProducer extends DefaultProducer {
 
         // if we are starting up then log at info level, and if runtime then log at debug
level to not flood the log
         if (onStartup) {
-            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath.toString());
+            log.info("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath.toString());
+                log.debug("Connecting to hdfs file-system {}:{}/{} (may take a while if connection
is not available)", config.getHostName(), config.getPort(), actualPath);
             }
         }
 
         HdfsOutputStream answer = HdfsOutputStream.createOutputStream(actualPath.toString(),
config);
 
         if (onStartup) {
-            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
actualPath.toString());
+            log.info("Connected to hdfs file-system {}:{}/{}", config.getHostName(), config.getPort(),
actualPath);
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), actualPath.toString());
+                log.debug("Connected to hdfs file-system {}:{}/{}", config.getHostName(),
config.getPort(), actualPath);
             }
         }
 
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index 8e1dbab..e784730 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -164,7 +164,7 @@ public class HttpProducer extends DefaultProducer {
         // lets store the result in the output message.
         try {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Executing http {} method: {}", method.getName(), method.getURI().toString());
+                LOG.debug("Executing http {} method: {}", method.getName(), method.getURI());
             }
             int responseCode = executeMethod(method);
             LOG.debug("Http responseCode: {}", responseCode);
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
index fa314ab..a565608 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
@@ -188,7 +188,7 @@ public class HttpProducer extends DefaultProducer {
         HttpResponse httpResponse = null;
         try {
             if (LOG.isDebugEnabled()) {
-                LOG.debug("Executing http {} method: {}", httpRequest.getMethod(), httpRequest.getURI().toString());
+                LOG.debug("Executing http {} method: {}", httpRequest.getMethod(), httpRequest.getURI());
             }
             httpResponse = executeMethod(httpRequest);
             int responseCode = httpResponse.getStatusLine().getStatusCode();
diff --git a/components/camel-mllp/src/test/java/org/apache/camel/test/junit/rule/mllp/MllpServerResource.java
b/components/camel-mllp/src/test/java/org/apache/camel/test/junit/rule/mllp/MllpServerResource.java
index f76ab91..ffca9ba 100644
--- a/components/camel-mllp/src/test/java/org/apache/camel/test/junit/rule/mllp/MllpServerResource.java
+++ b/components/camel-mllp/src/test/java/org/apache/camel/test/junit/rule/mllp/MllpServerResource.java
@@ -683,7 +683,7 @@ public class MllpServerResource extends ExternalResource {
                     serverSocket.bind(listenAddress, backlog);
                 } catch (BindException bindEx) {
                     if (System.currentTimeMillis() < startTicks + bindTimeout) {
-                        log.warn("Unable to bind to {} - retrying in {} milliseconds", listenAddress.toString(),
bindRetryDelay);
+                        log.warn("Unable to bind to {} - retrying in {} milliseconds", listenAddress,
bindRetryDelay);
                         try {
                             Thread.sleep(bindRetryDelay);
                         } catch (InterruptedException interruptedEx) {
@@ -972,10 +972,10 @@ public class MllpServerResource extends ExternalResource {
 
                 switch (characterReceived) {
                 case MllpProtocolConstants.START_OF_BLOCK:
-                    log.error("Received START_OF_BLOCK before END_OF_DATA.  Discarding data:
{}", parsedMessage.toString());
+                    log.error("Received START_OF_BLOCK before END_OF_DATA.  Discarding data:
{}", parsedMessage);
                     return null;
                 case MllpProtocolConstants.END_OF_STREAM:
-                    log.error("Received END_OF_STREAM without END_OF_DATA.  Discarding data:
{}", parsedMessage.toString());
+                    log.error("Received END_OF_STREAM without END_OF_DATA.  Discarding data:
{}", parsedMessage);
                     return null;
                 case MllpProtocolConstants.END_OF_BLOCK:
                     characterReceived = anInputStream.read();
diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java
b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java
index 7896d40..8b9e10e 100644
--- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java
+++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java
@@ -108,7 +108,7 @@ public class GridFsEndpoint extends DefaultEndpoint {
 
     @SuppressWarnings("deprecation")
     public void initializeConnection() throws Exception {
-        LOG.info("Initialize GridFS endpoint: {}", this.toString());
+        LOG.info("Initialize GridFS endpoint: {}", this);
         if (database == null) {
             throw new IllegalStateException("Missing required endpoint configuration: database");
         }
diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
index 212231a..002e2e6 100644
--- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
+++ b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
@@ -204,7 +204,7 @@ public class MongoDbEndpoint extends DefaultEndpoint {
      * @throws CamelMongoDbException
      */
     public void initializeConnection() throws CamelMongoDbException {
-        LOG.info("Initialising MongoDb endpoint: {}", this.toString());
+        LOG.info("Initialising MongoDb endpoint: {}", this);
         if (database == null || (collection == null && !(MongoDbOperation.getDbStats.equals(operation)
|| MongoDbOperation.command.equals(operation)))) {
             throw new CamelMongoDbException("Missing required endpoint configuration: database
and/or collection");
         }
diff --git a/components/camel-mongodb3/src/main/java/org/apache/camel/component/mongodb3/MongoDbEndpoint.java
b/components/camel-mongodb3/src/main/java/org/apache/camel/component/mongodb3/MongoDbEndpoint.java
index 77fec41..d90a000 100644
--- a/components/camel-mongodb3/src/main/java/org/apache/camel/component/mongodb3/MongoDbEndpoint.java
+++ b/components/camel-mongodb3/src/main/java/org/apache/camel/component/mongodb3/MongoDbEndpoint.java
@@ -209,7 +209,7 @@ public class MongoDbEndpoint extends DefaultEndpoint {
      * @throws CamelMongoDbException
      */
     public void initializeConnection() throws CamelMongoDbException {
-        LOG.info("Initialising MongoDb endpoint: {}", this.toString());
+        LOG.info("Initialising MongoDb endpoint: {}", this);
         if (database == null || (collection == null && !(getDbStats.equals(operation)
|| command.equals(operation)))) {
             throw new CamelMongoDbException("Missing required endpoint configuration: database
and/or collection");
         }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
index 42c279a..5c6b0a3 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
@@ -260,14 +260,14 @@ public class Olingo2AppAPITest {
         olingoApp.read(edm, TEST_MANUFACTURER_FOUNDED_PROPERTY, null, null, propertyHandler);
 
         Calendar founded = (Calendar) propertyHandler.await().get(FOUNDED_PROPERTY);
-        LOG.info("Founded property {}", founded.toString());
+        LOG.info("Founded property {}", founded);
 
         final TestOlingo2ResponseHandler<Calendar> valueHandler = new TestOlingo2ResponseHandler<>();
 
         olingoApp.read(edm, TEST_MANUFACTURER_FOUNDED_VALUE, null, null, valueHandler);
 
         founded = valueHandler.await();
-        LOG.info("Founded property {}", founded.toString());
+        LOG.info("Founded property {}", founded);
 
         final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler =
             new TestOlingo2ResponseHandler<>();
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
index f23099a..49b2728 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
@@ -121,7 +121,7 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
         assertNotNull(manufacturer);
         final Map<String, Object> properties = manufacturer.getProperties();
         assertEquals("Manufacturer Id", "1", properties.get(ID_PROPERTY));
-        LOG.info("Manufacturer: {}", properties.toString());
+        LOG.info("Manufacturer: {}", properties);
     }
 
     @Test
diff --git a/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
b/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
index bd6c230..6ffe62f 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
@@ -257,14 +257,14 @@ public class Olingo4AppAPITest {
 
         ClientPrimitiveValue name = propertyHandler.await();
         assertEquals("San Francisco International Airport", name.toString());
-        LOG.info("Airport name property value {}", name.asPrimitive().toString());
+        LOG.info("Airport name property value {}", name.asPrimitive());
 
         final TestOlingo4ResponseHandler<ClientPrimitiveValue> valueHandler = new TestOlingo4ResponseHandler<>();
 
         olingoApp.read(edm, TEST_AIRPORTS_SIMPLE_PROPERTY_VALUE, null, null, valueHandler);
         ClientPrimitiveValue nameValue = valueHandler.await();
         assertEquals("San Francisco International Airport", name.toString());
-        LOG.info("Airport name property value {}", nameValue.toString());
+        LOG.info("Airport name property value {}", nameValue);
 
         TestOlingo4ResponseHandler<HttpStatusCode> statusHandler = new TestOlingo4ResponseHandler<>();
         // All properties updates (simple and complex) are performing through
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
index a917939..61a071d 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
@@ -99,7 +99,7 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
         assertEquals(20, count.intValue());
 
         final ClientPrimitiveValue value = (ClientPrimitiveValue)requestBodyAndHeaders("direct://readvalue",
null, headers);
-        LOG.info("Client value \"{}\" has type {}", value.toString(), value.getTypeName());
+        LOG.info("Client value \"{}\" has type {}", value, value.getTypeName());
         assertEquals("Male", value.asPrimitive().toString());
 
         final ClientPrimitiveValue singleProperty = (ClientPrimitiveValue)requestBodyAndHeaders("direct://readsingleprop",
null, headers);
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 0182790..31faf62 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -538,7 +538,7 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
             // get content type
             MediaType mediaType = response.getEntity().getMediaType();
             if (mediaType != null) {
-                LOG.debug("Setting the Content-Type to be {}",  mediaType.toString());
+                LOG.debug("Setting the Content-Type to be {}", mediaType);
                 exchange.getOut().setHeader(Exchange.CONTENT_TYPE, mediaType.toString());
             }
             if (streamRepresentation && response.getEntity() instanceof StreamRepresentation)
{
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
index 33139df..88dade2 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
@@ -58,7 +58,7 @@ public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase
{
             merchandise = in.getMandatoryBody(Merchandise__c.class);
 
             assertNotNull("Missing event body", merchandise);
-            log.info("Merchandise notification: {}", merchandise.toString());
+            log.info("Merchandise notification: {}", merchandise);
             assertNotNull("Missing field Id", merchandise.getId());
             assertNotNull("Missing field Name", merchandise.getName());
 
diff --git a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
index 7d787b2..a493eee 100644
--- a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
+++ b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
@@ -248,7 +248,7 @@ public final class SyslogConverter {
         }
 
         syslogMessage.setLogMessage(msg.toString());
-        LOG.trace("Syslog message : {}", syslogMessage.toString());
+        LOG.trace("Syslog message : {}", syslogMessage);
 
         return syslogMessage;
     }


Mime
View raw message