You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/01/17 09:16:28 UTC

[3/4] camel git commit: CAMEL-10546: Renamed few variables in camel-core

CAMEL-10546: Renamed few variables in camel-core


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

Branch: refs/heads/master
Commit: 63252178a48eb061af783fdc6f21dcab31868776
Parents: 93fdb1d
Author: aldettinger <al...@gmail.com>
Authored: Sun Jan 15 17:19:35 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 17 10:11:02 2017 +0100

----------------------------------------------------------------------
 .../camel/processor/DefaultExchangeFormatter.java |  6 +++---
 .../java/org/apache/camel/util/MessageHelper.java | 18 +++++++++---------
 .../camel/spring/CamelContextAwareTest.java       |  8 ++++----
 3 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/63252178/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index dfa2a1f..5cf552f 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -456,9 +456,9 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
     private int getMaxChars(Message message) {
         int maxChars = getMaxChars();
         if (message.getExchange() != null) {
-            String property = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_MAX_CHARS);
-            if (property != null) {
-                maxChars = message.getExchange().getContext().getTypeConverter().convertTo(Integer.class, property);
+            String globalOption = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_MAX_CHARS);
+            if (globalOption != null) {
+                maxChars = message.getExchange().getContext().getTypeConverter().convertTo(Integer.class, globalOption);
             }
         }
         return maxChars;

http://git-wip-us.apache.org/repos/asf/camel/blob/63252178/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java b/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
index afb37d8..4e9de42 100644
--- a/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
@@ -175,9 +175,9 @@ public final class MessageHelper {
     public static String extractValueForLogging(Object value, Message message) {
         boolean streams = false;
         if (message.getExchange() != null) {
-            String property = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_STREAMS);
-            if (property != null) {
-                streams = message.getExchange().getContext().getTypeConverter().convertTo(Boolean.class, message.getExchange(), property);
+            String globalOption = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_STREAMS);
+            if (globalOption != null) {
+                streams = message.getExchange().getContext().getTypeConverter().convertTo(Boolean.class, message.getExchange(), globalOption);
             }
         }
 
@@ -208,9 +208,9 @@ public final class MessageHelper {
     public static String extractBodyForLogging(Message message, String prepend) {
         boolean streams = false;
         if (message.getExchange() != null) {
-            String property = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_STREAMS);
-            if (property != null) {
-                streams = message.getExchange().getContext().getTypeConverter().convertTo(Boolean.class, message.getExchange(), property);
+            String globalOption = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_STREAMS);
+            if (globalOption != null) {
+                streams = message.getExchange().getContext().getTypeConverter().convertTo(Boolean.class, message.getExchange(), globalOption);
             }
         }
         return extractBodyForLogging(message, prepend, streams, false);
@@ -234,9 +234,9 @@ public final class MessageHelper {
         int maxChars = 1000;
 
         if (message.getExchange() != null) {
-            String property = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_MAX_CHARS);
-            if (property != null) {
-                maxChars = message.getExchange().getContext().getTypeConverter().convertTo(Integer.class, property);
+            String globalOption = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_MAX_CHARS);
+            if (globalOption != null) {
+                maxChars = message.getExchange().getContext().getTypeConverter().convertTo(Integer.class, globalOption);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/63252178/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
index ddc466c..338aefa 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
@@ -32,10 +32,10 @@ public class CamelContextAwareTest extends SpringTestSupport {
 
     public void testInjectionPoints() throws Exception {
         assertNotNull("No CamelContext injected!", bean1.getCamelContext());
-        Map<String, String> properties  = bean1.getCamelContext().getGlobalOptions();
-        assertNotNull("the properties should not been null", properties);
-        assertEquals("No properties injected", properties.size(), 1);
-        assertEquals("Should get the value of org.apache.camel.test", properties.get("org.apache.camel.test"), "this is a test first");
+        Map<String, String> globalOptions  = bean1.getCamelContext().getGlobalOptions();
+        assertNotNull("the properties should not been null", globalOptions);
+        assertEquals("No properties injected", globalOptions.size(), 1);
+        assertEquals("Should get the value of org.apache.camel.test", globalOptions.get("org.apache.camel.test"), "this is a test first");
     }
     
     public void testCamelTemplates() throws Exception {