camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: Fixed CS
Date Mon, 02 Mar 2015 09:31:27 GMT
Fixed CS


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

Branch: refs/heads/master
Commit: 1ba5a6bc38921aeba27747b9864ec5fc954ff754
Parents: 0375fb1
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Mar 2 10:28:09 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Mar 2 10:28:09 2015 +0100

----------------------------------------------------------------------
 .../org/apache/camel/scr/internal/ScrHelper.java  |  5 ++++-
 .../univocity/AbstractUniVocityDataFormat.java    | 18 ++++++++++++------
 .../camel/dataformat/univocity/Marshaller.java    |  3 +--
 .../univocity/UniVocityFixedWidthDataFormat.java  |  4 ++--
 .../camel/dataformat/univocity/Unmarshaller.java  |  8 ++++----
 .../UniVocityCsvDataFormatMarshalSpringTest.java  |  1 -
 .../UniVocityCsvDataFormatMarshalTest.java        |  3 +--
 ...UniVocityCsvDataFormatUnmarshalSpringTest.java |  1 -
 .../UniVocityCsvDataFormatUnmarshalTest.java      |  3 +--
 ...cityFixedWidthDataFormatMarshalSpringTest.java |  2 +-
 .../UniVocityFixedWidthDataFormatMarshalTest.java |  3 +--
 ...tyFixedWidthDataFormatUnmarshalSpringTest.java |  1 -
 ...niVocityFixedWidthDataFormatUnmarshalTest.java |  3 +--
 .../dataformat/univocity/UniVocityTestHelper.java |  7 ++++---
 .../UniVocityTsvDataFormatMarshalSpringTest.java  |  1 -
 .../UniVocityTsvDataFormatMarshalTest.java        |  3 +--
 ...UniVocityTsvDataFormatUnmarshalSpringTest.java |  1 -
 .../UniVocityTsvDataFormatUnmarshalTest.java      |  3 +--
 18 files changed, 34 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-scr/src/main/java/org/apache/camel/scr/internal/ScrHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-scr/src/main/java/org/apache/camel/scr/internal/ScrHelper.java
b/components/camel-scr/src/main/java/org/apache/camel/scr/internal/ScrHelper.java
index 493edba..f6a3d8d 100644
--- a/components/camel-scr/src/main/java/org/apache/camel/scr/internal/ScrHelper.java
+++ b/components/camel-scr/src/main/java/org/apache/camel/scr/internal/ScrHelper.java
@@ -37,6 +37,8 @@ import org.w3c.dom.NodeList;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+// CHECKSTYLE:OFF
+// turn off checkstyle as it fails internally
 
 /**
  * Helper class.
@@ -68,7 +70,6 @@ public final class ScrHelper {
                         } catch (XPathExpressionException e) {
                             // ignore
                             LOG.debug("Error evaluating xpath to obtain namespace prefix.
This exception is ignored and using namespace: http://www.osgi.org/xmlns/scr/v1.1.0", e);
-
                         }
                         return "http://www.osgi.org/xmlns/scr/v1.1.0";
                     default:
@@ -108,3 +109,5 @@ public final class ScrHelper {
     }
 
 }
+// CHECKSTYLE:ON
+

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/AbstractUniVocityDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/AbstractUniVocityDataFormat.java
b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/AbstractUniVocityDataFormat.java
index 1ab8f8f..b5d6959 100644
--- a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/AbstractUniVocityDataFormat.java
+++ b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/AbstractUniVocityDataFormat.java
@@ -29,9 +29,9 @@ import com.univocity.parsers.common.CommonParserSettings;
 import com.univocity.parsers.common.CommonSettings;
 import com.univocity.parsers.common.CommonWriterSettings;
 import com.univocity.parsers.common.Format;
-
 import org.apache.camel.Exchange;
 import org.apache.camel.spi.DataFormat;
+
 import static org.apache.camel.util.IOHelper.getCharsetName;
 
 /**
@@ -48,7 +48,7 @@ import static org.apache.camel.util.IOHelper.getCharsetName;
  * @param <DF>  the data format class (for providing a fluent API)
  */
 public abstract class AbstractUniVocityDataFormat<F extends Format, CWS extends CommonWriterSettings<F>,
-    W extends AbstractWriter<CWS>, CPS extends CommonParserSettings<F>, P extends
AbstractParser<CPS>, DF extends AbstractUniVocityDataFormat<F, CWS, W, CPS, P, DF>>
implements DataFormat {
+        W extends AbstractWriter<CWS>, CPS extends CommonParserSettings<F>, P
extends AbstractParser<CPS>, DF extends AbstractUniVocityDataFormat<F, CWS, W, CPS,
P, DF>> implements DataFormat {
     protected String nullValue;
     protected Boolean skipEmptyLines;
     protected Boolean ignoreTrailingWhitespaces;
@@ -83,13 +83,16 @@ public abstract class AbstractUniVocityDataFormat<F extends Format,
CWS extends
             synchronized (writerSettingsToken) {
                 if (writerSettings == null) {
                     writerSettings = createAndConfigureWriterSettings();
-                    marshaller = new Marshaller<>(headers, headers == null);
+                    marshaller = new Marshaller<W>(headers, headers == null);
                 }
             }
         }
 
-        try (Writer writer = new OutputStreamWriter(stream, getCharsetName(exchange))) {
+        Writer writer = new OutputStreamWriter(stream, getCharsetName(exchange));
+        try {
             marshaller.marshal(exchange, body, createWriter(writer, writerSettings));
+        } finally {
+            writer.close();
         }
     }
 
@@ -107,16 +110,19 @@ public abstract class AbstractUniVocityDataFormat<F extends Format,
CWS extends
                             return createAndConfigureParserSettings();
                         }
                     };
-                    unmarshaller = new Unmarshaller<>(lazyLoad, asMap);
+                    unmarshaller = new Unmarshaller<P>(lazyLoad, asMap);
                 }
             }
         }
 
-        try (Reader reader = new InputStreamReader(stream, getCharsetName(exchange))) {
+        Reader reader = new InputStreamReader(stream, getCharsetName(exchange));
+        try {
             HeaderRowProcessor headerRowProcessor = new HeaderRowProcessor();
             CPS settings = parserSettings.get();
             settings.setRowProcessor(headerRowProcessor);
             return unmarshaller.unmarshal(reader, createParser(settings), headerRowProcessor);
+        } finally {
+            reader.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Marshaller.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Marshaller.java
b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Marshaller.java
index 662c09b..5c113cb 100644
--- a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Marshaller.java
+++ b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Marshaller.java
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 
 import com.univocity.parsers.common.AbstractWriter;
-
 import org.apache.camel.Exchange;
 import org.apache.camel.NoTypeConversionAvailableException;
 
@@ -36,7 +35,7 @@ import static org.apache.camel.util.ExchangeHelper.convertToType;
  * @param <W> Writer class
  */
 final class Marshaller<W extends AbstractWriter<?>> {
-    private final LinkedHashSet<String> headers = new LinkedHashSet<>();
+    private final LinkedHashSet<String> headers = new LinkedHashSet<String>();
     private final boolean adaptHeaders;
 
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormat.java
b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormat.java
index 5fa464b..6458849 100644
--- a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormat.java
+++ b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormat.java
@@ -30,7 +30,7 @@ import com.univocity.parsers.fixed.FixedWidthWriterSettings;
  * This class is the data format that uses the fixed-width uniVocity parser.
  */
 public class UniVocityFixedWidthDataFormat extends AbstractUniVocityDataFormat<FixedWidthFormat,
FixedWidthWriterSettings,
-    FixedWidthWriter, FixedWidthParserSettings, FixedWidthParser, UniVocityFixedWidthDataFormat>
{
+        FixedWidthWriter, FixedWidthParserSettings, FixedWidthParser, UniVocityFixedWidthDataFormat>
{
     protected int[] fieldLengths;
     protected Boolean skipTrailingCharsUntilNewline;
     protected Boolean recordEndsOnNewline;
@@ -207,7 +207,7 @@ public class UniVocityFixedWidthDataFormat extends AbstractUniVocityDataFormat<F
         if (fieldLengths.length != headers.length) {
             throw new IllegalArgumentException("The headers and fieldLengths must have the
same number of element in order to use the fixed-width format.");
         }
-        LinkedHashMap<String, Integer> fields = new LinkedHashMap<>();
+        LinkedHashMap<String, Integer> fields = new LinkedHashMap<String, Integer>();
         for (int i = 0; i < headers.length; i++) {
             fields.put(headers[i], fieldLengths[i]);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Unmarshaller.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Unmarshaller.java
b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Unmarshaller.java
index ccb5c1b..bf36cca 100644
--- a/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Unmarshaller.java
+++ b/components/camel-univocity-parsers/src/main/java/org/apache/camel/dataformat/univocity/Unmarshaller.java
@@ -58,7 +58,7 @@ final class Unmarshaller<P extends AbstractParser<?>> {
      */
     public Object unmarshal(Reader reader, P parser, HeaderRowProcessor headerRowProcessor)
{
         parser.beginParsing(reader);
-        Iterator<?> iterator = asMap ? new MapRowIterator<>(parser, headerRowProcessor)
: new ListRowIterator<>(parser);
+        Iterator<?> iterator = asMap ? new MapRowIterator<P>(parser, headerRowProcessor)
: new ListRowIterator<P>(parser);
         return lazyLoad ? iterator : convertToList(iterator);
     }
 
@@ -70,7 +70,7 @@ final class Unmarshaller<P extends AbstractParser<?>> {
      * @return a list that contains all the items of the iterator
      */
     private static <T> List<T> convertToList(Iterator<T> iterator) {
-        List<T> result = new ArrayList<>();
+        List<T> result = new ArrayList<T>();
         while (iterator.hasNext()) {
             result.add(iterator.next());
         }
@@ -83,7 +83,7 @@ final class Unmarshaller<P extends AbstractParser<?>> {
      * @param <E> Row class
      * @param <P> Parser class
      */
-    private abstract  static class RowIterator<E, P extends AbstractParser<?>>
implements Iterator<E> {
+    private abstract static class RowIterator<E, P extends AbstractParser<?>>
implements Iterator<E> {
         private final P parser;
         private String[] row;
 
@@ -187,7 +187,7 @@ final class Unmarshaller<P extends AbstractParser<?>> {
             String[] headers = headerRowProcessor.getHeaders();
 
             int size = Math.min(row.length, headers.length);
-            Map<String, String> result = new LinkedHashMap<>(size);
+            Map<String, String> result = new LinkedHashMap<String, String>(size);
             for (int i = 0; i < size; i++) {
                 result.put(headers[i], row[i]);
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalSpringTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalSpringTest.java
index cd5a06a..9654346 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalSpringTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalSpringTest.java
@@ -21,7 +21,6 @@ import java.util.Arrays;
 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/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalTest.java
index 2adc580..1e63431 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatMarshalTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.univocity.UniVocityTestHelper.asMap;
@@ -122,7 +121,7 @@ public final class UniVocityCsvDataFormatMarshalTest extends CamelTestSupport
{
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
-        final Map<String, DataFormat> tests = new HashMap<>();
+        final Map<String, DataFormat> tests = new HashMap<String, DataFormat>();
 
         // Default writing of CSV
         tests.put("default", new UniVocityCsvDataFormat());

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalSpringTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalSpringTest.java
index 348f3d4..68d6ec5 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalSpringTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalSpringTest.java
@@ -24,7 +24,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/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalTest.java
index 63a577a..1909e36 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalTest.java
@@ -28,7 +28,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.univocity.UniVocityTestHelper.asMap;
@@ -149,7 +148,7 @@ public final class UniVocityCsvDataFormatUnmarshalTest extends CamelTestSupport
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
-        final Map<String, DataFormat> tests = new HashMap<>();
+        final Map<String, DataFormat> tests = new HashMap<String, DataFormat>();
 
         // Default reading of CSV
         tests.put("default", new UniVocityCsvDataFormat());

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalSpringTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalSpringTest.java
index f88fc88..7b07e21 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalSpringTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalSpringTest.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 package org.apache.camel.dataformat.univocity;
+
 import java.util.Arrays;
 
 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/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalTest.java
index b7661af..a6e2029 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.univocity.UniVocityTestHelper.asMap;
@@ -122,7 +121,7 @@ public final class UniVocityFixedWidthDataFormatMarshalTest extends CamelTestSup
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
-        final Map<String, DataFormat> tests = new HashMap<>();
+        final Map<String, DataFormat> tests = new HashMap<String, DataFormat>();
 
         // Default writing of fixed-width
         tests.put("default", new UniVocityFixedWidthDataFormat()

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalSpringTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalSpringTest.java
index c955c1c..975de4c 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalSpringTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalSpringTest.java
@@ -24,7 +24,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/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalTest.java
index 6dc9f29..9f53ca2 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalTest.java
@@ -28,7 +28,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.univocity.UniVocityTestHelper.asMap;
@@ -148,7 +147,7 @@ public final class UniVocityFixedWidthDataFormatUnmarshalTest extends
CamelTestS
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
-        final Map<String, DataFormat> tests = new HashMap<>();
+        final Map<String, DataFormat> tests = new HashMap<String, DataFormat>();
 
         // Default reading of fixed-width
         tests.put("default", new UniVocityFixedWidthDataFormat()

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTestHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTestHelper.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTestHelper.java
index df23bda..b141881 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTestHelper.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTestHelper.java
@@ -25,11 +25,12 @@ import static java.lang.System.lineSeparator;
  * This class provides utility methods for the unit tests
  */
 final class UniVocityTestHelper {
-    
+
     private UniVocityTestHelper() {
         // Helper class
     }
-     /**
+
+    /**
      * Creates a Map with the given key values
      *
      * @param keyValues the key values
@@ -40,7 +41,7 @@ final class UniVocityTestHelper {
             throw new IllegalArgumentException("You must specify key values with an even
number.");
         }
 
-        Map<String, String> result = new LinkedHashMap<>(keyValues.length / 2);
+        Map<String, String> result = new LinkedHashMap<String, String>(keyValues.length
/ 2);
         for (int i = 0; i < keyValues.length; i += 2) {
             result.put(keyValues[i], keyValues[i + 1]);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalSpringTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalSpringTest.java
index 62d22e4..c6dbcf6 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalSpringTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalSpringTest.java
@@ -21,7 +21,6 @@ import java.util.Arrays;
 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/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalTest.java
index 1c31724..6f06a3c 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.univocity.UniVocityTestHelper.asMap;
@@ -122,7 +121,7 @@ public final class UniVocityTsvDataFormatMarshalTest extends CamelTestSupport
{
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
-        final Map<String, DataFormat> tests = new HashMap<>();
+        final Map<String, DataFormat> tests = new HashMap<String, DataFormat>();
 
         // Default writing of TSV
         tests.put("default", new UniVocityTsvDataFormat());

http://git-wip-us.apache.org/repos/asf/camel/blob/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalSpringTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalSpringTest.java
index 5966d2f..428c912 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalSpringTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalSpringTest.java
@@ -24,7 +24,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/1ba5a6bc/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalTest.java
b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalTest.java
index 2ee4594..90c8287 100644
--- a/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalTest.java
+++ b/components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatUnmarshalTest.java
@@ -28,7 +28,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.junit4.CamelTestSupport;
-
 import org.junit.Test;
 
 import static org.apache.camel.dataformat.univocity.UniVocityTestHelper.asMap;
@@ -148,7 +147,7 @@ public final class UniVocityTsvDataFormatUnmarshalTest extends CamelTestSupport
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
-        final Map<String, DataFormat> tests = new HashMap<>();
+        final Map<String, DataFormat> tests = new HashMap<String, DataFormat>();
 
         // Default reading of TSV
         tests.put("default", new UniVocityTsvDataFormat());


Mime
View raw message