Quantcast

[1/6] camel git commit: [CAMEL-10840] Fix checkstyle errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1/6] camel git commit: [CAMEL-10840] Fix checkstyle errors

davsclaus-2
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x b8c6386be -> c123041ca
  refs/heads/master 78d7a81b7 -> 375121d8c


[CAMEL-10840] Fix checkstyle errors

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

Branch: refs/heads/master
Commit: 7af77f2c847d8060b91d7a6fd714ef8b0c5e2dac
Parents: d6b0675
Author: Christian Ribeaud <[hidden email]>
Authored: Fri Feb 17 07:57:32 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Fri Feb 17 09:53:21 2017 +0100

----------------------------------------------------------------------
 .../csv/CsvDataFormatCustomRecordConverterTest.java |  6 ++----
 .../csv/converter/MyCvsRecordConverter.java         | 16 ++++++++++++++++
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7af77f2c/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
index 67c341f..b08ace4 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.dataformat.csv;
 
 import java.util.Arrays;
@@ -26,12 +25,11 @@ import org.apache.camel.Message;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.apache.camel.util.CastUtils;
-
-import static org.junit.Assert.*;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.junit.Assert.*;
+
 /**
  * Test cases for {@link CsvRecordConverter}.
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/7af77f2c/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
index edd25fd..dfc73b1 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.dataformat.csv.converter;
 
 import java.util.Arrays;

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[2/6] camel git commit: [CAMEL-10840] Make 'CsvRecordConverter' public and visible

davsclaus-2
[CAMEL-10840] Make 'CsvRecordConverter' public and visible

Tests included.

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

Branch: refs/heads/master
Commit: d6b06755de8c18c96ab4b047115bb7ee0895ed23
Parents: 78d7a81
Author: Christian Ribeaud <[hidden email]>
Authored: Fri Feb 17 07:40:18 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Fri Feb 17 09:53:21 2017 +0100

----------------------------------------------------------------------
 .../dataformat/csv/CsvRecordConverter.java      | 76 ++++++++++----------
 .../CsvDataFormatCustomRecordConverterTest.java | 64 +++++++++++++++++
 .../csv/converter/MyCvsRecordConverter.java     | 30 ++++++++
 .../csv/CsvDataFormatCustomRecordConverter.xml  | 43 +++++++++++
 4 files changed, 175 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d6b06755/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
index 01abf9b..ca3a2e1 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
@@ -1,38 +1,38 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.dataformat.csv;
-
-import org.apache.commons.csv.CSVRecord;
-
-/**
- * This interface is used to define a converter that transform a {@link org.apache.commons.csv.CSVRecord} into another
- * type.
- * <p/>
- * The {@link org.apache.camel.dataformat.csv.CsvRecordConverters} class defines common converters.
- *
- * @param <T> Conversion type
- * @see org.apache.camel.dataformat.csv.CsvRecordConverters
- */
-interface CsvRecordConverter<T> {
-    /**
-     * Converts the CSV record into another type.
-     *
-     * @param record CSV record to convert
-     * @return converted CSV record
-     */
-    T convertRecord(CSVRecord record);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.csv;
+
+import org.apache.commons.csv.CSVRecord;
+
+/**
+ * This interface is used to define a converter that transform a {@link org.apache.commons.csv.CSVRecord} into another
+ * type.
+ * <p/>
+ * The {@link org.apache.camel.dataformat.csv.CsvRecordConverters} class defines common converters.
+ *
+ * @param <T> Conversion type
+ * @see org.apache.camel.dataformat.csv.CsvRecordConverters
+ */
+public interface CsvRecordConverter<T> {
+    /**
+     * Converts the CSV record into another type.
+     *
+     * @param record CSV record to convert
+     * @return converted CSV record
+     */
+    T convertRecord(CSVRecord record);
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/d6b06755/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
new file mode 100644
index 0000000..67c341f
--- /dev/null
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.dataformat.csv;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.camel.Message;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.spring.CamelSpringTestSupport;
+import org.apache.camel.util.CastUtils;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Test cases for {@link CsvRecordConverter}.
+ */
+public class CsvDataFormatCustomRecordConverterTest extends CamelSpringTestSupport {
+
+    @Test
+    public void unmarshalTest() throws InterruptedException {
+        MockEndpoint mock = getMockEndpoint("mock:unmarshaled");
+        mock.expectedMessageCount(1);
+        template.sendBody("direct:unmarshal", getData());
+        mock.assertIsSatisfied();
+        Message message = mock.getReceivedExchanges().get(0).getIn();
+        List<List<String>> body = CastUtils.cast((List)message.getBody());
+        assertNotNull(body);
+        assertEquals(body.size(), 1);
+        List<String> row = body.get(0);
+        assertEquals(row.size(), 3);
+        assertEquals(row.toString(), "[Hello, Again, Democracy]");
+    }
+
+    private String getData() {
+        return Stream.of("A1", "B1", "C1").collect(Collectors.joining(";"));
+    }
+
+    @Override
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext(
+                                                  "org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml");
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/d6b06755/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
new file mode 100644
index 0000000..edd25fd
--- /dev/null
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
@@ -0,0 +1,30 @@
+package org.apache.camel.dataformat.csv.converter;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.camel.dataformat.csv.CsvRecordConverter;
+import org.apache.commons.csv.CSVRecord;
+
+/**
+ * Test {@link CsvRecordConverter} implementation.
+ * <p>
+ * This implementation is explicitely created in a subpackage to check the
+ * visibility of {@link CsvRecordConverter}.
+ * </p>
+ */
+public class MyCvsRecordConverter implements CsvRecordConverter<List<String>> {
+
+    private final String[] record;
+
+    public MyCvsRecordConverter(String... record) {
+        assert record != null : "Unspecified record";
+        this.record = record;
+    }
+
+    @Override
+    public List<String> convertRecord(CSVRecord record) {
+        assert record != null : "Unspecified record";
+        return Arrays.asList(this.record);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/d6b06755/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
new file mode 100644
index 0000000..7fbb7c2
--- /dev/null
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+    http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+ <bean id="record-converter" class="org.apache.camel.dataformat.csv.converter.MyCvsRecordConverter">
+ <constructor-arg>
+ <array>
+ <value>Hello</value>
+ <value>Again</value>
+ <value>Democracy</value>
+ </array>
+ </constructor-arg>
+ </bean>
+
+ <camelContext id="csvCamelContext" xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:unmarshal" />
+ <unmarshal>
+ <csv recordConverterRef="record-converter" delimiter=";" headerDisabled="true" />
+ </unmarshal>
+ <to uri="mock:unmarshaled" />
+ </route>
+ </camelContext>
+
+</beans>
\ No newline at end of file

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[3/6] camel git commit: Fixed CS. This closes #1471

davsclaus-2
In reply to this post by davsclaus-2
Fixed CS. This closes #1471


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

Branch: refs/heads/master
Commit: 375121d8c2ec34e27064087949d55fec1e4983b3
Parents: 7af77f2
Author: Claus Ibsen <[hidden email]>
Authored: Fri Feb 17 09:58:24 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Fri Feb 17 09:58:24 2017 +0100

----------------------------------------------------------------------
 .../CsvDataFormatCustomFactoryTest-context.xml  | 30 ++++----
 .../csv/CsvDataFormatCustomRecordConverter.xml  | 68 ++++++++--------
 ...CsvDataFormatResourceFactoryTest-context.xml | 30 ++++----
 ...utogenColumnsSpringQuoteModeTest-context.xml | 71 ++++++++---------
 ...vMarshalAutogenColumnsSpringTest-context.xml | 71 ++++++++---------
 ...svMarshalPipeDelimiterSpringTest-context.xml | 41 +++++-----
 .../CsvUnmarshalMapLineSpringTest-context.xml   | 81 ++++++++++----------
 ...UnmarshalPipeDelimiterSpringTest-context.xml | 37 ++++-----
 ...UnmarshalSkipFirstLineSpringTest-context.xml | 37 ++++-----
 .../CsvUnmarshalStreamSpringTest-context.xml    | 29 +++----
 ...vUnmarshalTabDelimiterSpringTest-context.xml | 29 +++----
 11 files changed, 266 insertions(+), 258 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomFactoryTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomFactoryTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomFactoryTest-context.xml
index 3668a73..8c1fa1a 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomFactoryTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomFactoryTest-context.xml
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
index 7fbb7c2..fb1a799 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
@@ -1,43 +1,43 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
- <bean id="record-converter" class="org.apache.camel.dataformat.csv.converter.MyCvsRecordConverter">
- <constructor-arg>
- <array>
- <value>Hello</value>
- <value>Again</value>
- <value>Democracy</value>
- </array>
- </constructor-arg>
- </bean>
+  <bean id="record-converter" class="org.apache.camel.dataformat.csv.converter.MyCvsRecordConverter">
+    <constructor-arg>
+      <array>
+        <value>Hello</value>
+        <value>Again</value>
+        <value>Democracy</value>
+      </array>
+    </constructor-arg>
+  </bean>
 
- <camelContext id="csvCamelContext" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:unmarshal" />
- <unmarshal>
- <csv recordConverterRef="record-converter" delimiter=";" headerDisabled="true" />
- </unmarshal>
- <to uri="mock:unmarshaled" />
- </route>
- </camelContext>
+  <camelContext id="csvCamelContext" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:unmarshal"/>
+      <unmarshal>
+        <csv recordConverterRef="record-converter" delimiter=";" headerDisabled="true"/>
+      </unmarshal>
+      <to uri="mock:unmarshaled"/>
+    </route>
+  </camelContext>
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatResourceFactoryTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatResourceFactoryTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatResourceFactoryTest-context.xml
index f6b60f2..05275aa 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatResourceFactoryTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatResourceFactoryTest-context.xml
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
index aaed0af..3e2b4cc 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
@@ -1,54 +1,55 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
 
     <route>
-        <from uri="direct:start"/>
-        <marshal>
-            <csv delimiter="|" skipHeaderRecord="true" quoteMode="ALL">
-                <header>item</header>
-            </csv>
-        </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result" />
+      <from uri="direct:start"/>
+      <marshal>
+        <csv delimiter="|" skipHeaderRecord="true" quoteMode="ALL">
+          <header>item</header>
+        </csv>
+      </marshal>
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result"/>
     </route>
 
     <route>
-      <from uri="direct:start2" />
+      <from uri="direct:start2"/>
       <marshal>
-          <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true" >
-              <header>orderId</header>
-              <header>amount</header>
-          </csv>
+        <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true">
+          <header>orderId</header>
+          <header>amount</header>
+        </csv>
       </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result2" />
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result2"/>
     </route>
 
   </camelContext>
 
-    <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
-        <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
-    </bean>
+  <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
+    <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
+  </bean>
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
index 864cad9..c8d4c82 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
@@ -1,54 +1,55 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
 
     <route>
-        <from uri="direct:start"/>
-        <marshal>
-            <csv delimiter="|" skipHeaderRecord="true">
-                <header>item</header>
-            </csv>
-        </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result" />
+      <from uri="direct:start"/>
+      <marshal>
+        <csv delimiter="|" skipHeaderRecord="true">
+          <header>item</header>
+        </csv>
+      </marshal>
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result"/>
     </route>
 
     <route>
-      <from uri="direct:start2" />
+      <from uri="direct:start2"/>
       <marshal>
-          <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true">
-              <header>orderId</header>
-              <header>amount</header>
-          </csv>
+        <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true">
+          <header>orderId</header>
+          <header>amount</header>
+        </csv>
       </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result2" />
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result2"/>
     </route>
 
   </camelContext>
 
-    <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
-        <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
-    </bean>
+  <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
+    <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
+  </bean>
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
index 338beef..36ad2f3 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
@@ -1,33 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
     <route>
-      <from uri="direct:start" />
+      <from uri="direct:start"/>
       <marshal>
-          <csv delimiter="|" skipHeaderRecord="true"/>
+        <csv delimiter="|" skipHeaderRecord="true"/>
       </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result" />
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result"/>
     </route>
   </camelContext>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
index f7c11b5..2d59564 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
+  contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version
-  2.0 (the "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-  http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-  applicable law or agreed to in writing, software distributed under
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-  OR CONDITIONS OF ANY KIND, either express or implied. See the
-  License for the specific language governing permissions and
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
   limitations under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
@@ -20,35 +21,35 @@
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <unmarshal>
-                <csv delimiter="|" useMaps="true"/>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-        <route>
-            <from uri="direct:explicitHeader"/>
-            <unmarshal>
-                <csv delimiter="|" useMaps="true">
-                    <header>MyOrderId</header>
-                    <header>MyItem</header>
-                    <header>MyAmount</header>
-                </csv>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-        <route>
-            <from uri="direct:replaceHeader"/>
-            <unmarshal>
-                <csv delimiter="|" useMaps="true" skipHeaderRecord="true">
-                    <header>MyOrderId</header>
-                    <header>MyItem</header>
-                    <header>MyAmount</header>
-                </csv>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <unmarshal>
+        <csv delimiter="|" useMaps="true"/>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+    <route>
+      <from uri="direct:explicitHeader"/>
+      <unmarshal>
+        <csv delimiter="|" useMaps="true">
+          <header>MyOrderId</header>
+          <header>MyItem</header>
+          <header>MyAmount</header>
+        </csv>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+    <route>
+      <from uri="direct:replaceHeader"/>
+      <unmarshal>
+        <csv delimiter="|" useMaps="true" skipHeaderRecord="true">
+          <header>MyOrderId</header>
+          <header>MyItem</header>
+          <header>MyAmount</header>
+        </csv>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
 </beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
index d3c386e..fca920c 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
+  contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version
-  2.0 (the "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-  http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-  applicable law or agreed to in writing, software distributed under
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-  OR CONDITIONS OF ANY KIND, either express or implied. See the
-  License for the specific language governing permissions and
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
   limitations under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
@@ -20,13 +21,13 @@
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <unmarshal>
-                <csv delimiter="|" headerDisabled="true"/>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <unmarshal>
+        <csv delimiter="|" headerDisabled="true"/>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
index 92fdd31..73a3a91 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
+  contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version
-  2.0 (the "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-  http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-  applicable law or agreed to in writing, software distributed under
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-  OR CONDITIONS OF ANY KIND, either express or implied. See the
-  License for the specific language governing permissions and
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
   limitations under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
@@ -20,13 +21,13 @@
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <unmarshal>
-                <csv delimiter="|" skipHeaderRecord="true"/>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <unmarshal>
+        <csv delimiter="|" skipHeaderRecord="true"/>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
index 41c5b56..7e71c85 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="

http://git-wip-us.apache.org/repos/asf/camel/blob/375121d8/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
index 8f95297..8396cca 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[4/6] camel git commit: [CAMEL-10840] Make 'CsvRecordConverter' public and visible

davsclaus-2
In reply to this post by davsclaus-2
[CAMEL-10840] Make 'CsvRecordConverter' public and visible

Tests included.

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

Branch: refs/heads/camel-2.18.x
Commit: 81632bbf562e2f4e3bb223a91c0e73fbf3e1ce22
Parents: b8c6386
Author: Christian Ribeaud <[hidden email]>
Authored: Fri Feb 17 07:40:18 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Fri Feb 17 09:58:52 2017 +0100

----------------------------------------------------------------------
 .../dataformat/csv/CsvRecordConverter.java      | 76 ++++++++++----------
 .../CsvDataFormatCustomRecordConverterTest.java | 64 +++++++++++++++++
 .../csv/converter/MyCvsRecordConverter.java     | 30 ++++++++
 .../csv/CsvDataFormatCustomRecordConverter.xml  | 43 +++++++++++
 4 files changed, 175 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/81632bbf/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
index 01abf9b..ca3a2e1 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverter.java
@@ -1,38 +1,38 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.dataformat.csv;
-
-import org.apache.commons.csv.CSVRecord;
-
-/**
- * This interface is used to define a converter that transform a {@link org.apache.commons.csv.CSVRecord} into another
- * type.
- * <p/>
- * The {@link org.apache.camel.dataformat.csv.CsvRecordConverters} class defines common converters.
- *
- * @param <T> Conversion type
- * @see org.apache.camel.dataformat.csv.CsvRecordConverters
- */
-interface CsvRecordConverter<T> {
-    /**
-     * Converts the CSV record into another type.
-     *
-     * @param record CSV record to convert
-     * @return converted CSV record
-     */
-    T convertRecord(CSVRecord record);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.csv;
+
+import org.apache.commons.csv.CSVRecord;
+
+/**
+ * This interface is used to define a converter that transform a {@link org.apache.commons.csv.CSVRecord} into another
+ * type.
+ * <p/>
+ * The {@link org.apache.camel.dataformat.csv.CsvRecordConverters} class defines common converters.
+ *
+ * @param <T> Conversion type
+ * @see org.apache.camel.dataformat.csv.CsvRecordConverters
+ */
+public interface CsvRecordConverter<T> {
+    /**
+     * Converts the CSV record into another type.
+     *
+     * @param record CSV record to convert
+     * @return converted CSV record
+     */
+    T convertRecord(CSVRecord record);
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/81632bbf/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
new file mode 100644
index 0000000..67c341f
--- /dev/null
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.dataformat.csv;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.camel.Message;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.spring.CamelSpringTestSupport;
+import org.apache.camel.util.CastUtils;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Test cases for {@link CsvRecordConverter}.
+ */
+public class CsvDataFormatCustomRecordConverterTest extends CamelSpringTestSupport {
+
+    @Test
+    public void unmarshalTest() throws InterruptedException {
+        MockEndpoint mock = getMockEndpoint("mock:unmarshaled");
+        mock.expectedMessageCount(1);
+        template.sendBody("direct:unmarshal", getData());
+        mock.assertIsSatisfied();
+        Message message = mock.getReceivedExchanges().get(0).getIn();
+        List<List<String>> body = CastUtils.cast((List)message.getBody());
+        assertNotNull(body);
+        assertEquals(body.size(), 1);
+        List<String> row = body.get(0);
+        assertEquals(row.size(), 3);
+        assertEquals(row.toString(), "[Hello, Again, Democracy]");
+    }
+
+    private String getData() {
+        return Stream.of("A1", "B1", "C1").collect(Collectors.joining(";"));
+    }
+
+    @Override
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext(
+                                                  "org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml");
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/81632bbf/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
new file mode 100644
index 0000000..edd25fd
--- /dev/null
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
@@ -0,0 +1,30 @@
+package org.apache.camel.dataformat.csv.converter;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.camel.dataformat.csv.CsvRecordConverter;
+import org.apache.commons.csv.CSVRecord;
+
+/**
+ * Test {@link CsvRecordConverter} implementation.
+ * <p>
+ * This implementation is explicitely created in a subpackage to check the
+ * visibility of {@link CsvRecordConverter}.
+ * </p>
+ */
+public class MyCvsRecordConverter implements CsvRecordConverter<List<String>> {
+
+    private final String[] record;
+
+    public MyCvsRecordConverter(String... record) {
+        assert record != null : "Unspecified record";
+        this.record = record;
+    }
+
+    @Override
+    public List<String> convertRecord(CSVRecord record) {
+        assert record != null : "Unspecified record";
+        return Arrays.asList(this.record);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/81632bbf/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
new file mode 100644
index 0000000..7fbb7c2
--- /dev/null
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+    http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+ <bean id="record-converter" class="org.apache.camel.dataformat.csv.converter.MyCvsRecordConverter">
+ <constructor-arg>
+ <array>
+ <value>Hello</value>
+ <value>Again</value>
+ <value>Democracy</value>
+ </array>
+ </constructor-arg>
+ </bean>
+
+ <camelContext id="csvCamelContext" xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:unmarshal" />
+ <unmarshal>
+ <csv recordConverterRef="record-converter" delimiter=";" headerDisabled="true" />
+ </unmarshal>
+ <to uri="mock:unmarshaled" />
+ </route>
+ </camelContext>
+
+</beans>
\ No newline at end of file

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[5/6] camel git commit: [CAMEL-10840] Fix checkstyle errors

davsclaus-2
In reply to this post by davsclaus-2
[CAMEL-10840] Fix checkstyle errors

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

Branch: refs/heads/camel-2.18.x
Commit: e0de0d20872d9c124be138313681934ce49d58a8
Parents: 81632bb
Author: Christian Ribeaud <[hidden email]>
Authored: Fri Feb 17 07:57:32 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Fri Feb 17 09:59:00 2017 +0100

----------------------------------------------------------------------
 .../csv/CsvDataFormatCustomRecordConverterTest.java |  6 ++----
 .../csv/converter/MyCvsRecordConverter.java         | 16 ++++++++++++++++
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e0de0d20/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
index 67c341f..b08ace4 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverterTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.dataformat.csv;
 
 import java.util.Arrays;
@@ -26,12 +25,11 @@ import org.apache.camel.Message;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.apache.camel.util.CastUtils;
-
-import static org.junit.Assert.*;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.junit.Assert.*;
+
 /**
  * Test cases for {@link CsvRecordConverter}.
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/e0de0d20/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
index edd25fd..dfc73b1 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/converter/MyCvsRecordConverter.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.dataformat.csv.converter;
 
 import java.util.Arrays;

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[6/6] camel git commit: Fixed CS. This closes #1471

davsclaus-2
In reply to this post by davsclaus-2
Fixed CS. This closes #1471


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

Branch: refs/heads/camel-2.18.x
Commit: c123041cacc6a77a5c38571aaf6ae8e55b899e3c
Parents: e0de0d2
Author: Claus Ibsen <[hidden email]>
Authored: Fri Feb 17 09:58:24 2017 +0100
Committer: Claus Ibsen <[hidden email]>
Committed: Fri Feb 17 09:59:32 2017 +0100

----------------------------------------------------------------------
 .../csv/CsvDataFormatCustomRecordConverter.xml  | 68 ++++++++--------
 ...utogenColumnsSpringQuoteModeTest-context.xml | 71 ++++++++---------
 ...vMarshalAutogenColumnsSpringTest-context.xml | 71 ++++++++---------
 ...svMarshalPipeDelimiterSpringTest-context.xml | 41 +++++-----
 .../CsvUnmarshalMapLineSpringTest-context.xml   | 81 ++++++++++----------
 ...UnmarshalPipeDelimiterSpringTest-context.xml | 37 ++++-----
 ...UnmarshalSkipFirstLineSpringTest-context.xml | 37 ++++-----
 .../CsvUnmarshalStreamSpringTest-context.xml    | 29 +++----
 ...vUnmarshalTabDelimiterSpringTest-context.xml | 29 +++----
 9 files changed, 236 insertions(+), 228 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
index 7fbb7c2..fb1a799 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvDataFormatCustomRecordConverter.xml
@@ -1,43 +1,43 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
- <bean id="record-converter" class="org.apache.camel.dataformat.csv.converter.MyCvsRecordConverter">
- <constructor-arg>
- <array>
- <value>Hello</value>
- <value>Again</value>
- <value>Democracy</value>
- </array>
- </constructor-arg>
- </bean>
+  <bean id="record-converter" class="org.apache.camel.dataformat.csv.converter.MyCvsRecordConverter">
+    <constructor-arg>
+      <array>
+        <value>Hello</value>
+        <value>Again</value>
+        <value>Democracy</value>
+      </array>
+    </constructor-arg>
+  </bean>
 
- <camelContext id="csvCamelContext" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:unmarshal" />
- <unmarshal>
- <csv recordConverterRef="record-converter" delimiter=";" headerDisabled="true" />
- </unmarshal>
- <to uri="mock:unmarshaled" />
- </route>
- </camelContext>
+  <camelContext id="csvCamelContext" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:unmarshal"/>
+      <unmarshal>
+        <csv recordConverterRef="record-converter" delimiter=";" headerDisabled="true"/>
+      </unmarshal>
+      <to uri="mock:unmarshaled"/>
+    </route>
+  </camelContext>
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
index aaed0af..3e2b4cc 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringQuoteModeTest-context.xml
@@ -1,54 +1,55 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
 
     <route>
-        <from uri="direct:start"/>
-        <marshal>
-            <csv delimiter="|" skipHeaderRecord="true" quoteMode="ALL">
-                <header>item</header>
-            </csv>
-        </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result" />
+      <from uri="direct:start"/>
+      <marshal>
+        <csv delimiter="|" skipHeaderRecord="true" quoteMode="ALL">
+          <header>item</header>
+        </csv>
+      </marshal>
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result"/>
     </route>
 
     <route>
-      <from uri="direct:start2" />
+      <from uri="direct:start2"/>
       <marshal>
-          <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true" >
-              <header>orderId</header>
-              <header>amount</header>
-          </csv>
+        <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true">
+          <header>orderId</header>
+          <header>amount</header>
+        </csv>
       </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result2" />
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result2"/>
     </route>
 
   </camelContext>
 
-    <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
-        <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
-    </bean>
+  <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
+    <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
+  </bean>
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
index 864cad9..c8d4c82 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest-context.xml
@@ -1,54 +1,55 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
 
     <route>
-        <from uri="direct:start"/>
-        <marshal>
-            <csv delimiter="|" skipHeaderRecord="true">
-                <header>item</header>
-            </csv>
-        </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result" />
+      <from uri="direct:start"/>
+      <marshal>
+        <csv delimiter="|" skipHeaderRecord="true">
+          <header>item</header>
+        </csv>
+      </marshal>
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result"/>
     </route>
 
     <route>
-      <from uri="direct:start2" />
+      <from uri="direct:start2"/>
       <marshal>
-          <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true">
-              <header>orderId</header>
-              <header>amount</header>
-          </csv>
+        <csv formatRef="excelFormat" delimiter="|" skipHeaderRecord="true">
+          <header>orderId</header>
+          <header>amount</header>
+        </csv>
       </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result2" />
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result2"/>
     </route>
 
   </camelContext>
 
-    <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
-        <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
-    </bean>
+  <bean id="excelFormat" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
+    <property name="staticField" value="org.apache.commons.csv.CSVFormat.EXCEL"/>
+  </bean>
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
index 338beef..36ad2f3 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest-context.xml
@@ -1,33 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
     <route>
-      <from uri="direct:start" />
+      <from uri="direct:start"/>
       <marshal>
-          <csv delimiter="|" skipHeaderRecord="true"/>
+        <csv delimiter="|" skipHeaderRecord="true"/>
       </marshal>
-      <convertBodyTo type="java.lang.String" />
-      <to uri="mock:result" />
+      <convertBodyTo type="java.lang.String"/>
+      <to uri="mock:result"/>
     </route>
   </camelContext>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
index f7c11b5..2d59564 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest-context.xml
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
+  contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version
-  2.0 (the "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-  http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-  applicable law or agreed to in writing, software distributed under
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-  OR CONDITIONS OF ANY KIND, either express or implied. See the
-  License for the specific language governing permissions and
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
   limitations under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
@@ -20,35 +21,35 @@
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <unmarshal>
-                <csv delimiter="|" useMaps="true"/>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-        <route>
-            <from uri="direct:explicitHeader"/>
-            <unmarshal>
-                <csv delimiter="|" useMaps="true">
-                    <header>MyOrderId</header>
-                    <header>MyItem</header>
-                    <header>MyAmount</header>
-                </csv>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-        <route>
-            <from uri="direct:replaceHeader"/>
-            <unmarshal>
-                <csv delimiter="|" useMaps="true" skipHeaderRecord="true">
-                    <header>MyOrderId</header>
-                    <header>MyItem</header>
-                    <header>MyAmount</header>
-                </csv>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <unmarshal>
+        <csv delimiter="|" useMaps="true"/>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+    <route>
+      <from uri="direct:explicitHeader"/>
+      <unmarshal>
+        <csv delimiter="|" useMaps="true">
+          <header>MyOrderId</header>
+          <header>MyItem</header>
+          <header>MyAmount</header>
+        </csv>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+    <route>
+      <from uri="direct:replaceHeader"/>
+      <unmarshal>
+        <csv delimiter="|" useMaps="true" skipHeaderRecord="true">
+          <header>MyOrderId</header>
+          <header>MyItem</header>
+          <header>MyAmount</header>
+        </csv>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
 </beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
index d3c386e..fca920c 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest-context.xml
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
+  contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version
-  2.0 (the "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-  http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-  applicable law or agreed to in writing, software distributed under
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-  OR CONDITIONS OF ANY KIND, either express or implied. See the
-  License for the specific language governing permissions and
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
   limitations under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
@@ -20,13 +21,13 @@
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <unmarshal>
-                <csv delimiter="|" headerDisabled="true"/>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <unmarshal>
+        <csv delimiter="|" headerDisabled="true"/>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
index 92fdd31..73a3a91 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest-context.xml
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
+  contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version
-  2.0 (the "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-  http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-  applicable law or agreed to in writing, software distributed under
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-  OR CONDITIONS OF ANY KIND, either express or implied. See the
-  License for the specific language governing permissions and
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
   limitations under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
@@ -20,13 +21,13 @@
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <unmarshal>
-                <csv delimiter="|" skipHeaderRecord="true"/>
-            </unmarshal>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <unmarshal>
+        <csv delimiter="|" skipHeaderRecord="true"/>
+      </unmarshal>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
index 41c5b56..7e71c85 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest-context.xml
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="

http://git-wip-us.apache.org/repos/asf/camel/blob/c123041c/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
index 8f95297..8396cca 100644
--- a/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
+++ b/components/camel-csv/src/test/resources/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest-context.xml
@@ -1,19 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-  <!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version
-    2.0 (the "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under
-    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
-    OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and
-    limitations under the License.
-  -->
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="

Loading...