camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astefanu...@apache.org
Subject [2/2] camel git commit: Code clean-up
Date Fri, 06 May 2016 15:59:39 GMT
Code clean-up


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

Branch: refs/heads/master
Commit: ab31bc622132fe93542606704ff02f0b32715c5b
Parents: 758ee12
Author: Antonin Stefanutti <antonin@stefanutti.fr>
Authored: Fri May 6 17:59:18 2016 +0200
Committer: Antonin Stefanutti <antonin@stefanutti.fr>
Committed: Fri May 6 17:59:18 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/impl/DefaultComponent.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ab31bc62/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
----------------------------------------------------------------------
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 c6492ea..1ac7d26 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
@@ -41,8 +41,6 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Default component to use for base for components implementations.
- *
- * @version 
  */
 public abstract class DefaultComponent extends ServiceSupport implements Component {
     private static final Logger LOG = LoggerFactory.getLogger(DefaultComponent.class);
@@ -106,7 +104,7 @@ public abstract class DefaultComponent extends ServiceSupport implements
Compone
         validateURI(uri, path, parameters);
         if (LOG.isTraceEnabled()) {
             // at trace level its okay to have parameters logged, that may contain passwords
-            LOG.trace("Creating endpoint uri=[{}], path=[{}], parameters=[{}]", new Object[]{URISupport.sanitizeUri(uri),
URISupport.sanitizePath(path), parameters});
+            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)});
@@ -370,7 +368,7 @@ public abstract class DefaultComponent extends ServiceSupport implements
Compone
         if (value == null) {
             return defaultValue;
         } else {
-            return EndpointHelper.resolveReferenceParameter(getCamelContext(), value.toString(),
type);
+            return EndpointHelper.resolveReferenceParameter(getCamelContext(), value, type);
         }
     }
     
@@ -391,7 +389,7 @@ public abstract class DefaultComponent extends ServiceSupport implements
Compone
      * @see EndpointHelper#resolveReferenceListParameter(CamelContext, String, Class)
      */
     public <T> List<T> resolveAndRemoveReferenceListParameter(Map<String,
Object> parameters, String key, Class<T> elementType) {
-        return resolveAndRemoveReferenceListParameter(parameters, key, elementType, new ArrayList<T>(0));
+        return resolveAndRemoveReferenceListParameter(parameters, key, elementType, new ArrayList<>(0));
     }
 
     /**
@@ -418,7 +416,7 @@ public abstract class DefaultComponent extends ServiceSupport implements
Compone
         if (value == null) {
             return defaultValue;
         } else {
-            return EndpointHelper.resolveReferenceListParameter(getCamelContext(), value.toString(),
elementType);
+            return EndpointHelper.resolveReferenceListParameter(getCamelContext(), value,
elementType);
         }
     }
     


Mime
View raw message