camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] branch master updated: Fixed CS for Camel-Base where possible
Date Fri, 08 Feb 2019 10:01:35 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino 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 fbe6a16  Fixed CS for Camel-Base where possible
fbe6a16 is described below

commit fbe6a16652b8c822cf4f162e2c2c02a63d796d1c
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Fri Feb 8 11:01:09 2019 +0100

    Fixed CS for Camel-Base where possible
---
 .../org/apache/camel/cloud/ServiceCallExpressionSupport.java |  3 +--
 .../java/org/apache/camel/converter/jaxp/XmlConverter.java   |  2 +-
 .../camel/impl/converter/BaseTypeConverterRegistry.java      |  2 +-
 .../apache/camel/impl/converter/ToStringTypeConverter.java   |  6 +++---
 .../main/java/org/apache/camel/runtimecatalog/impl/Pair.java | 12 ++++++++----
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/core/camel-base/src/main/java/org/apache/camel/cloud/ServiceCallExpressionSupport.java
b/core/camel-base/src/main/java/org/apache/camel/cloud/ServiceCallExpressionSupport.java
index 6537a99..427f00c 100644
--- a/core/camel-base/src/main/java/org/apache/camel/cloud/ServiceCallExpressionSupport.java
+++ b/core/camel-base/src/main/java/org/apache/camel/cloud/ServiceCallExpressionSupport.java
@@ -18,7 +18,6 @@ package org.apache.camel.cloud;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.cloud.ServiceCallConstants;
 import org.apache.camel.support.ExchangeHelper;
 import org.apache.camel.support.ExpressionAdapter;
 
@@ -67,4 +66,4 @@ public abstract class ServiceCallExpressionSupport extends ExpressionAdapter
{
     }
 
     protected abstract String buildCamelEndpointUri(String name, String host, Integer port,
String uri, String contextPath, String scheme);
-}
\ No newline at end of file
+}
diff --git a/core/camel-base/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
b/core/camel-base/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
index 5fd6eac..162b3f8 100644
--- a/core/camel-base/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
+++ b/core/camel-base/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
@@ -695,7 +695,7 @@ public class XmlConverter {
         if (in instanceof IOHelper.EncodingInputStream) {
             // DocumentBuilder detects encoding from XML declaration, so we need to
             // revert the converted encoding for the input stream
-        	IOHelper.EncodingInputStream encIn = (IOHelper.EncodingInputStream) in;
+            IOHelper.EncodingInputStream encIn = (IOHelper.EncodingInputStream) in;
             return documentBuilder.parse(encIn.toOriginalInputStream());
         } else {
             return documentBuilder.parse(in);
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
b/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
index 5de237e..5a808b1 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
@@ -46,8 +46,8 @@ import org.apache.camel.spi.TypeConverterAware;
 import org.apache.camel.spi.TypeConverterLoader;
 import org.apache.camel.spi.TypeConverterRegistry;
 import org.apache.camel.support.MessageHelper;
-import org.apache.camel.support.service.ServiceSupport;
 import org.apache.camel.support.TypeConverterSupport;
+import org.apache.camel.support.service.ServiceSupport;
 import org.apache.camel.util.ObjectHelper;
 
 /**
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java
b/core/camel-base/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java
index 0e6e031..d1feca4 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java
@@ -31,10 +31,10 @@ import org.apache.camel.support.TypeConverterSupport;
  */
 public class ToStringTypeConverter extends TypeConverterSupport {
 
-    static Set<Class<?>> MISS_TYPES = new HashSet<>();
+    static Set<Class<?>> missTypes = new HashSet<>();
 
     public static void registerMissType(Class clazz) {
-        MISS_TYPES.add(clazz);
+        missTypes.add(clazz);
     }
 
     static {
@@ -48,7 +48,7 @@ public class ToStringTypeConverter extends TypeConverterSupport {
     public <T> T convertTo(Class<T> toType, Exchange exchange, Object value)
{
 
         // should not try to convert specific types
-        if (MISS_TYPES.stream().anyMatch(cl -> cl.isAssignableFrom(value.getClass())))
{
+        if (missTypes.stream().anyMatch(cl -> cl.isAssignableFrom(value.getClass())))
{
             return (T) MISS_VALUE;
         }
 
diff --git a/core/camel-base/src/main/java/org/apache/camel/runtimecatalog/impl/Pair.java
b/core/camel-base/src/main/java/org/apache/camel/runtimecatalog/impl/Pair.java
index d2060d7..16f1c58 100644
--- a/core/camel-base/src/main/java/org/apache/camel/runtimecatalog/impl/Pair.java
+++ b/core/camel-base/src/main/java/org/apache/camel/runtimecatalog/impl/Pair.java
@@ -41,11 +41,15 @@ public class Pair<T> {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) { 
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) { 
+            return false;
+        }
         Pair<?> that = (Pair<?>) o;
-        return Objects.equals(left, that.left) &&
-                Objects.equals(right, that.right);
+        return Objects.equals(left, that.left)
+                && Objects.equals(right, that.right);
     }
 
     @Override


Mime
View raw message