camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: Fixed CS
Date Mon, 02 Mar 2015 08:42:20 GMT
Repository: camel
Updated Branches:
  refs/heads/master 837df77a8 -> ebb8f5ccc


Fixed CS


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

Branch: refs/heads/master
Commit: ebb8f5ccc139348606638c5fee4c85622168b9dd
Parents: eea1a17
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Mar 2 09:43:07 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Mar 2 09:43:31 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/dataformat/csv/CsvDataFormat.java |  1 -
 .../apache/camel/dataformat/csv/CsvMarshaller.java | 17 ++++++++++-------
 .../camel/dataformat/csv/CsvRecordConverters.java  |  2 +-
 .../camel/dataformat/csv/CsvUnmarshaller.java      | 12 ++++++++----
 .../csv/CsvMarshalAutogenColumnsSpringTest.java    |  7 +++----
 .../csv/CsvMarshalPipeDelimiterSpringTest.java     | 10 ++++------
 .../csv/CsvMarshalPipeDelimiterTest.java           | 13 +++++--------
 .../camel/dataformat/csv/CsvMarshalTest.java       |  1 -
 .../camel/dataformat/csv/CsvRouteCharsetTest.java  |  1 -
 .../apache/camel/dataformat/csv/CsvRouteTest.java  | 11 +++++------
 .../csv/CsvUnmarshalMapLineSpringTest.java         |  1 -
 .../csv/CsvUnmarshalPipeDelimiterSpringTest.java   |  1 -
 .../csv/CsvUnmarshalPipeDelimiterTest.java         |  1 -
 .../csv/CsvUnmarshalSkipFirstLineSpringTest.java   |  1 -
 .../csv/CsvUnmarshalStreamSpringTest.java          |  1 -
 .../dataformat/csv/CsvUnmarshalStreamTest.java     |  1 -
 .../csv/CsvUnmarshalTabDelimiterSpringTest.java    |  1 -
 .../csv/CsvUnmarshalTabDelimiterTest.java          |  1 -
 .../camel/dataformat/csv/CsvUnmarshalTest.java     |  1 -
 ...CsvUnmarshalTwoCsvDataFormatConcurrentTest.java |  1 -
 .../org/apache/camel/dataformat/csv/TestUtils.java |  4 ++--
 21 files changed, 38 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
index 658b647..c75aa54 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
@@ -22,7 +22,6 @@ import java.util.Arrays;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.spi.DataFormat;
-
 import org.apache.commons.csv.CSVFormat;
 import org.apache.commons.csv.QuoteMode;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java
b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java
index df36219..dedc982 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java
@@ -28,7 +28,7 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.NoTypeConversionAvailableException;
 import org.apache.camel.util.ExchangeHelper;
-
+import org.apache.camel.util.IOHelper;
 import org.apache.commons.csv.CSVFormat;
 import org.apache.commons.csv.CSVPrinter;
 
@@ -41,7 +41,7 @@ abstract class CsvMarshaller {
     private CsvMarshaller(CSVFormat format) {
         this.format = format;
     }
-    
+
     /**
      * Creates a new instance.
      *
@@ -60,7 +60,7 @@ abstract class CsvMarshaller {
             return new FixedColumnsMarshaller(format, fixedColumns);
         }
         return new DynamicColumnsMarshaller(format);
-    }    
+    }
 
     /**
      * Marshals the given object into the given stream.
@@ -72,7 +72,8 @@ abstract class CsvMarshaller {
      * @throws IOException                        if we cannot write into the given stream
      */
     public void marshal(Exchange exchange, Object object, OutputStream outputStream) throws
NoTypeConversionAvailableException, IOException {
-        try (CSVPrinter printer = new CSVPrinter(new OutputStreamWriter(outputStream), format))
{
+        CSVPrinter printer = new CSVPrinter(new OutputStreamWriter(outputStream), format);
+        try {
             List<?> list = ExchangeHelper.convertToType(exchange, List.class, object);
             if (list != null) {
                 for (Object child : list) {
@@ -81,6 +82,8 @@ abstract class CsvMarshaller {
             } else {
                 printer.printRecord(getRecordValues(exchange, object));
             }
+        } finally {
+            IOHelper.close(printer);
         }
     }
 
@@ -115,7 +118,7 @@ abstract class CsvMarshaller {
 
         @Override
         protected Iterable<?> getMapRecordValues(Map<?, ?> map) {
-            List<Object> result = new ArrayList<>(fixedColumns.length);
+            List<Object> result = new ArrayList<Object>(fixedColumns.length);
             for (String key : fixedColumns) {
                 result.add(map.get(key));
             }
@@ -127,7 +130,7 @@ abstract class CsvMarshaller {
      * This marshaller adapts the columns but always keep them in the same order
      */
     private static final class DynamicColumnsMarshaller extends CsvMarshaller {
-        private final LinkedHashSet<Object> columns = new LinkedHashSet<>();
+        private final LinkedHashSet<Object> columns = new LinkedHashSet<Object>();
 
         private DynamicColumnsMarshaller(CSVFormat format) {
             super(format);
@@ -136,7 +139,7 @@ abstract class CsvMarshaller {
         @Override
         protected Iterable<?> getMapRecordValues(Map<?, ?> map) {
             columns.addAll(map.keySet());
-            List<Object> result = new ArrayList<>(columns.size());
+            List<Object> result = new ArrayList<Object>(columns.size());
             for (Object key : columns) {
                 result.add(map.get(key));
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverters.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverters.java
b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverters.java
index a3a28a8..120de7d 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverters.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvRecordConverters.java
@@ -46,7 +46,7 @@ final class CsvRecordConverters {
 
         @Override
         public List<String> convertRecord(CSVRecord record) {
-            List<String> answer = new ArrayList<>(record.size());
+            List<String> answer = new ArrayList<String>(record.size());
             for (int i = 0; i < record.size(); i++) {
                 answer.add(record.get(i));
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
index 13744b2..d5fc315 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
@@ -41,7 +41,7 @@ abstract class CsvUnmarshaller {
         this.format = format;
         this.converter = extractConverter(dataFormat);
     }
-    
+
     public static CsvUnmarshaller create(CSVFormat format, CsvDataFormat dataFormat) {
         // If we want to use maps, thus the header must be either fixed or automatic
         if (dataFormat.isUseMaps() && format.getHeader() == null) {
@@ -89,13 +89,16 @@ abstract class CsvUnmarshaller {
         }
 
         public Object unmarshal(Exchange exchange, InputStream inputStream) throws IOException
{
-            try (CSVParser parser = new CSVParser(new InputStreamReader(inputStream, IOHelper.getCharsetName(exchange)),
format)) {
+            CSVParser parser = new CSVParser(new InputStreamReader(inputStream, IOHelper.getCharsetName(exchange)),
format);
+            try {
                 return asList(parser.iterator(), converter);
+            } finally {
+                IOHelper.close(parser);
             }
         }
 
         private <T> List<T> asList(Iterator<CSVRecord> iterator, CsvRecordConverter<T>
converter) {
-            List<T> answer = new ArrayList<>();
+            List<T> answer = new ArrayList<T>();
             while (iterator.hasNext()) {
                 answer.add(converter.convertRecord(iterator.next()));
             }
@@ -106,6 +109,7 @@ abstract class CsvUnmarshaller {
     /**
      * This class streams the content of the CSV
      */
+    @SuppressWarnings("unchecked")
     private static final class StreamCsvUnmarshaller extends CsvUnmarshaller {
         private StreamCsvUnmarshaller(CSVFormat format, CsvDataFormat dataFormat) {
             super(format, dataFormat);
@@ -117,7 +121,7 @@ abstract class CsvUnmarshaller {
             try {
                 reader = new InputStreamReader(inputStream, IOHelper.getCharsetName(exchange));
                 CSVParser parser = new CSVParser(reader, format);
-                return new CsvIterator<>(parser.iterator(), converter);
+                return new CsvIterator(parser.iterator(), converter);
             } catch (Exception e) {
                 IOHelper.close(reader);
                 throw e;

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java
index 4665ddd..efa639a 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -71,15 +70,15 @@ public class CsvMarshalAutogenColumnsSpringTest extends CamelSpringTestSupport
{
     }
 
     private static List<Map<String, Object>> createBody() {
-        List<Map<String, Object>> data = new ArrayList<>();
+        List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
 
-        Map<String, Object> row1 = new LinkedHashMap<>();
+        Map<String, Object> row1 = new LinkedHashMap<String, Object>();
         row1.put("orderId", 123);
         row1.put("item", "Camel in Action");
         row1.put("amount", 1);
         data.add(row1);
 
-        Map<String, Object> row2 = new LinkedHashMap<>();
+        Map<String, Object> row2 = new LinkedHashMap<String, Object>();
         row2.put("orderId", 124);
         row2.put("item", "ActiveMQ in Action");
         row2.put("amount", 2);

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java
index 8d39fb2..fba0673 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -44,8 +43,7 @@ public class CsvMarshalPipeDelimiterSpringTest extends CamelSpringTestSupport
{
 
         assertMockEndpointsSatisfied();
 
-        String body = result.getReceivedExchanges().get(0).getIn().getBody(
-                String.class);
+        String body = result.getReceivedExchanges().get(0).getIn().getBody(String.class);
         String[] lines = body.split(System.lineSeparator());
         assertEquals(2, lines.length);
         assertEquals("123|Camel in Action|1", lines[0].trim());
@@ -53,15 +51,15 @@ public class CsvMarshalPipeDelimiterSpringTest extends CamelSpringTestSupport
{
     }
 
     private List<Map<String, Object>> createBody() {
-        List<Map<String, Object>> data = new ArrayList<>();
+        List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
 
-        Map<String, Object> row1 = new LinkedHashMap<>();
+        Map<String, Object> row1 = new LinkedHashMap<String, Object>();
         row1.put("orderId", 123);
         row1.put("item", "Camel in Action");
         row1.put("amount", 1);
         data.add(row1);
 
-        Map<String, Object> row2 = new LinkedHashMap<>();
+        Map<String, Object> row2 = new LinkedHashMap<String, Object>();
         row2.put("orderId", 124);
         row2.put("item", "ActiveMQ in Action");
         row2.put("amount", 2);

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java
index 8762505..eafbfa9 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 public class CsvMarshalPipeDelimiterTest extends CamelTestSupport {
@@ -41,8 +40,7 @@ public class CsvMarshalPipeDelimiterTest extends CamelTestSupport {
 
         assertMockEndpointsSatisfied();
 
-        String body = result.getReceivedExchanges().get(0).getIn().getBody(
-                String.class);
+        String body = result.getReceivedExchanges().get(0).getIn().getBody(String.class);
         String[] lines = body.split(System.lineSeparator());
         assertEquals(2, lines.length);
         assertEquals("123|Camel in Action|1", lines[0].trim());
@@ -50,15 +48,15 @@ public class CsvMarshalPipeDelimiterTest extends CamelTestSupport {
     }
 
     private List<Map<String, Object>> createBody() {
-        List<Map<String, Object>> data = new ArrayList<>();
+        List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
 
-        Map<String, Object> row1 = new LinkedHashMap<>();
+        Map<String, Object> row1 = new LinkedHashMap<String, Object>();
         row1.put("orderId", 123);
         row1.put("item", "Camel in Action");
         row1.put("amount", 1);
         data.add(row1);
 
-        Map<String, Object> row2 = new LinkedHashMap<>();
+        Map<String, Object> row2 = new LinkedHashMap<String, Object>();
         row2.put("orderId", 124);
         row2.put("item", "ActiveMQ in Action");
         row2.put("amount", 2);
@@ -73,8 +71,7 @@ public class CsvMarshalPipeDelimiterTest extends CamelTestSupport {
             public void configure() throws Exception {
                 CsvDataFormat csv = new CsvDataFormat().setDelimiter('|').setHeaderDisabled(true);
 
-                from("direct:start").marshal(csv).convertBodyTo(String.class)
-                        .to("mock:result");
+                from("direct:start").marshal(csv).convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalTest.java
index d8d8a2e..580e7e0 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteCharsetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteCharsetTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteCharsetTest.java
index 7e0aa35..241d581 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteCharsetTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteCharsetTest.java
@@ -38,7 +38,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 public class CsvRouteCharsetTest extends CamelTestSupport {

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
index c4e2447..91b718a 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
@@ -42,7 +42,6 @@ import org.apache.camel.Message;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -56,7 +55,7 @@ public class CsvRouteTest extends CamelTestSupport {
         resultEndpoint.expectedMessageCount(1);
 
         // START SNIPPET: marshalInput
-        Map<String, Object> body = new HashMap<>();
+        Map<String, Object> body = new HashMap<String, Object>();
         body.put("foo", "abc");
         body.put("bar", 123);
         // END SNIPPET: marshalInput
@@ -83,11 +82,11 @@ public class CsvRouteTest extends CamelTestSupport {
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:resultMulti",
                 MockEndpoint.class);
         resultEndpoint.expectedMessageCount(2);
-        Map<String, Object> body1 = new HashMap<>();
+        Map<String, Object> body1 = new HashMap<String, Object>();
         body1.put("foo", "abc");
         body1.put("bar", 123);
 
-        Map<String, Object> body2 = new HashMap<>();
+        Map<String, Object> body2 = new HashMap<String, Object>();
         body2.put("foo", "def");
         body2.put("bar", 456);
         body2.put("baz", 789);
@@ -124,11 +123,11 @@ public class CsvRouteTest extends CamelTestSupport {
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:resultMultiCustom",
                 MockEndpoint.class);
         resultEndpoint.expectedMessageCount(2);
-        Map<String, Object> body1 = new HashMap<>();
+        Map<String, Object> body1 = new HashMap<String, Object>();
         body1.put("foo", "abc");
         body1.put("bar", 123);
 
-        Map<String, Object> body2 = new HashMap<>();
+        Map<String, Object> body2 = new HashMap<String, Object>();
         body2.put("foo", "def");
         body2.put("bar", 456);
         body2.put("baz", 789);

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest.java
index 3a93546..2c5fa3a 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalMapLineSpringTest.java
@@ -22,7 +22,6 @@ import java.util.Map;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest.java
index b819f25..3edcf34 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterSpringTest.java
@@ -21,7 +21,6 @@ import java.util.List;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterTest.java
index 9856d1b..cb74f3b 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalPipeDelimiterTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest.java
index 2bf3df1..193b44c 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalSkipFirstLineSpringTest.java
@@ -21,7 +21,6 @@ import java.util.List;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest.java
index 42cdf28..4c880c4 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamSpringTest.java
@@ -23,7 +23,6 @@ import java.util.NoSuchElementException;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamTest.java
index 7c99801..3b17964 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalStreamTest.java
@@ -26,7 +26,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest.java
index 1e4d49f..f951544 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterSpringTest.java
@@ -21,7 +21,6 @@ import java.util.List;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
-
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterTest.java
index 13f7782..8e28235 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTabDelimiterTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 public class CsvUnmarshalTabDelimiterTest extends CamelTestSupport {

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTest.java
index e476f92..0e86e9c 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTest.java
@@ -24,7 +24,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.csv.TestUtils.asMap;

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
index 8b730b4..fff54ed 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalTwoCsvDataFormatConcurrentTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 public class CsvUnmarshalTwoCsvDataFormatConcurrentTest extends CamelTestSupport {

http://git-wip-us.apache.org/repos/asf/camel/blob/ebb8f5cc/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/TestUtils.java
----------------------------------------------------------------------
diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/TestUtils.java
b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/TestUtils.java
index 48dfd12..38e74a7 100644
--- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/TestUtils.java
+++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/TestUtils.java
@@ -27,7 +27,7 @@ final class TestUtils {
     private TestUtils() {
         // Prevent instantiation
     }
-    
+
     /**
      * Create a map with the given key/value pairs
      *
@@ -39,7 +39,7 @@ final class TestUtils {
             throw new IllegalArgumentException("Cannot create a map with an add number of
strings");
         }
 
-        Map<String, String> map = new HashMap<>(strings.length / 2);
+        Map<String, String> map = new HashMap<String, String>(strings.length
/ 2);
         for (int i = 0; i < strings.length; i += 2) {
             map.put(strings[i], strings[i + 1]);
         }


Mime
View raw message