camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: CAMEL-7142: Polished.
Date Sun, 19 Jan 2014 13:13:31 GMT
Updated Branches:
  refs/heads/master 5359727af -> 96c04e778


CAMEL-7142: Polished.

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

Branch: refs/heads/master
Commit: 96c04e778617fbf97ef972b04e75c6b4a03149bf
Parents: 5359727
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Sun Jan 19 14:12:29 2014 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Sun Jan 19 14:12:29 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/dataformat/csv/CsvDataFormat.java  |  8 ++++----
 .../csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java | 12 +++++++-----
 2 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/96c04e77/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
index a409b77..309ae0e 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
@@ -70,9 +70,9 @@ public class CsvDataFormat implements DataFormat {
         for (Field field : CSVStrategy.class.getFields()) {
             try {
                 if (field.get(null) == csvStrategy) {
-                    // return a safe copy of the declared constant so that we don't cause
any side effect
-                    // by (potentially) other CsvDataFormat objects in use as we change properties
of
-                    // the strategy (e.g. it's set delimiter through the #unmarshal() method
below)
+                    // return a safe copy of the declared static constant so that we don't
cause any side effect
+                    // by (potentially) other CsvDataFormat objects in use, as we change
the properties of the
+                    // strategy itself (e.g. it's set delimiter through the #unmarshal()
method below)
                     LOGGER.debug("Returning a clone of {} as it is the declared constant
{} by the CSVStrategy class", csvStrategy, field.getName());
 
                     return (CSVStrategy) csvStrategy.clone();
@@ -82,7 +82,7 @@ public class CsvDataFormat implements DataFormat {
             }
         }
 
-        // not a declared constant of CSVStrategy, so return it as is
+        // not a declared static constant of CSVStrategy so return it as is
         return csvStrategy;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/96c04e77/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
index c721fd3..08dbc61 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
@@ -50,6 +50,7 @@ public class CsvUnmarshalTwoCsvDataFormatConcurrentTest extends CamelTestSupport
 
     private void sendAndVerify(String delimiter, MockEndpoint mock) throws InterruptedException
{
         template.sendBody("direct:start", "123" + delimiter + "Camel in Action" + delimiter
+ "1\n124" + delimiter + "ActiveMQ in Action" + delimiter + "2");
+
         assertMockEndpointsSatisfied();
 
         @SuppressWarnings("unchecked")
@@ -73,15 +74,16 @@ public class CsvUnmarshalTwoCsvDataFormatConcurrentTest extends CamelTestSupport
                 CsvDataFormat csv2 = new CsvDataFormat();
                 csv2.setDelimiter(";");
 
-                from("direct:start").multicast().parallelProcessing().to("direct:csv", "direct:csv2");
+                from("direct:start")
+                    .multicast().parallelProcessing().to("direct:csv", "direct:csv2");
 
                 from("direct:csv")
-                        .unmarshal(csv)
-                        .to("mock:result");
+                    .unmarshal(csv)
+                    .to("mock:result");
 
                 from("direct:csv2")
-                        .unmarshal(csv2)
-                        .to("mock:result2");
+                    .unmarshal(csv2)
+                    .to("mock:result2");
             }
         };
     }


Mime
View raw message