You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/10/17 08:50:06 UTC

[1/2] camel git commit: [CAMEL-9227] No type converter available to convert from Bean to List

Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x aa7371e69 -> eb9a9e332


[CAMEL-9227] No type converter available to convert from Bean to List


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

Branch: refs/heads/camel-2.16.x
Commit: 8496831ee8b6118da192c24b17f011ea035b2198
Parents: aa7371e
Author: Thomas Diesler <th...@jboss.com>
Authored: Fri Oct 16 12:02:24 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Oct 17 08:51:43 2015 +0200

----------------------------------------------------------------------
 .../converter/dozer/DozerTypeConverter.java     | 61 ++++++-------
 .../converter/dozer/DozerBeanMappingTest.java   | 94 ++++++++++++++++++++
 .../camel/converter/dozer/model/CustomerA.java  | 66 ++++++++++++++
 .../camel/converter/dozer/model/CustomerB.java  | 84 +++++++++++++++++
 .../resources/bean-to-bean-dozer-mappings.xml   | 17 ++++
 .../resources/bean-to-map-dozer-mappings.xml    | 17 ++++
 6 files changed, 307 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8496831e/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
index e5114e4..0505a64 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
 public class DozerTypeConverter extends TypeConverterSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(DozerTypeConverter.class);
-    
+
     private final DozerBeanMapper mapper;
 
     public DozerTypeConverter(DozerBeanMapper mapper) {
@@ -53,42 +53,39 @@ public class DozerTypeConverter extends TypeConverterSupport {
 
     @Override
     public <T> T convertTo(Class<T> type, Exchange exchange, Object value) throws TypeConversionException {
-        // find the map id, so we can provide that when trying to map from source to destination
-        String mapId = null;
-        if (value != null) {
-            Class<?> sourceType = value.getClass();
-            Class<?> destType = type;
-            ClassMappingMetadata metadata = mapper.getMappingMetadata().getClassMapping(sourceType, destType);
-            if (metadata != null) {
-                mapId = metadata.getMapId();
+
+        CamelContext context = exchange != null ? exchange.getContext() : null;
+        ClassLoader appcl = context != null ? context.getApplicationContextClassLoader() : null;
+
+        T result;
+
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        try {
+            if (appcl != null && appcl != tccl) {
+                LOG.debug("Switching TCCL to: {}", appcl);
+                Thread.currentThread().setContextClassLoader(appcl);
             }
-        }
 
-        // if the exchange is null, we have no chance to ensure that the TCCL is the one from the CamelContext
-        if (exchange == null) {
-            return mapper.map(value, type, mapId);
-        }
-        
-        T answer = null;
+            // find the map id, so we can provide that when trying to map from source to destination
+            String mapId = null;
+            if (value != null) {
+                Class<?> sourceType = value.getClass();
+                Class<?> destType = type;
+                ClassMappingMetadata metadata = mapper.getMappingMetadata().getClassMapping(sourceType, destType);
+                if (metadata != null) {
+                    mapId = metadata.getMapId();
+                }
+            }
 
-        ClassLoader prev = Thread.currentThread().getContextClassLoader();
-        ClassLoader contextCl = exchange.getContext().getApplicationContextClassLoader();
-        if (contextCl != null) {
-            // otherwise, we ensure that the TCCL is the correct one
-            LOG.debug("Switching TCCL to: {}.", contextCl);
-            try {
-                Thread.currentThread().setContextClassLoader(contextCl);
-                answer = mapper.map(value, type, mapId);
-            } finally {
-                LOG.debug("Restored TCCL to: {}.", prev);
-                Thread.currentThread().setContextClassLoader(prev);
+            result = mapper.map(value, type, mapId);
+
+        } finally {
+            if (appcl != null && appcl != tccl) {
+                Thread.currentThread().setContextClassLoader(tccl);
+                LOG.debug("Restored TCCL to: {}", tccl);
             }
-        } else {
-            // just try with the current TCCL as-is
-            answer = mapper.map(value, type, mapId);
         }
 
-        return answer;
+        return result;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/8496831e/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
new file mode 100644
index 0000000..50ff0f3
--- /dev/null
+++ b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
@@ -0,0 +1,94 @@
+/*
+ * #%L
+ * Wildfly Camel :: Testsuite
+ * %%
+ * Copyright (C) 2013 - 2014 RedHat
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package org.apache.camel.converter.dozer;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.converter.dozer.model.Customer;
+import org.apache.camel.converter.dozer.model.CustomerA;
+import org.apache.camel.converter.dozer.model.CustomerB;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class DozerBeanMappingTest {
+
+    @Test
+    public void testMarshalViaDozer() throws Exception {
+
+        CamelContext camelctx = new DefaultCamelContext();
+        camelctx.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").convertBodyTo(HashMap.class);
+            }
+        });
+
+        DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
+        mconfig.setMappingFiles(Arrays.asList(new String[] { "bean-to-map-dozer-mappings.xml" }));
+        new DozerTypeConverterLoader(camelctx, mconfig);
+
+        camelctx.start();
+        try {
+            ProducerTemplate producer = camelctx.createProducerTemplate();
+            Map<?, ?> result = producer.requestBody("direct:start", new Customer("John", "Doe", null), Map.class);
+            Assert.assertEquals("John", result.get("firstName"));
+            Assert.assertEquals("Doe", result.get("lastName"));
+        } finally {
+            camelctx.stop();
+        }
+    }
+
+    @Test
+    public void testBeanMapping() throws Exception {
+
+        CamelContext camelctx = new DefaultCamelContext();
+        camelctx.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").convertBodyTo(CustomerB.class);
+            }
+        });
+
+        DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
+        mconfig.setMappingFiles(Arrays.asList(new String[] { "bean-to-bean-dozer-mappings.xml" }));
+        new DozerTypeConverterLoader(camelctx, mconfig);
+
+        CustomerA customerA = new CustomerA("Peter", "Post", "SomeStreet", "12345");
+
+        camelctx.start();
+        try {
+            ProducerTemplate producer = camelctx.createProducerTemplate();
+            CustomerB result = producer.requestBody("direct:start", customerA, CustomerB.class);
+            Assert.assertEquals(customerA.getFirstName(), result.getFirstName());
+            Assert.assertEquals(customerA.getLastName(), result.getLastName());
+            Assert.assertEquals(customerA.getStreet(), result.getAddress().getStreet());
+            Assert.assertEquals(customerA.getZip(), result.getAddress().getZip());
+        } finally {
+            camelctx.stop();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/8496831e/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
new file mode 100644
index 0000000..22b9227
--- /dev/null
+++ b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
@@ -0,0 +1,66 @@
+/*
+ * #%L
+ * Wildfly Camel :: Testsuite
+ * %%
+ * Copyright (C) 2013 - 2014 RedHat
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package org.apache.camel.converter.dozer.model;
+
+
+public class CustomerA {
+
+    private String firstName;
+    private String lastName;
+    private String street;
+    private String zip;
+
+    public CustomerA() {
+    }
+
+    public CustomerA(String firstName, String lastName, String street, String zip) {
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.street = street;
+        this.zip = zip;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+    public String getLastName() {
+        return lastName;
+    }
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+    public String getStreet() {
+        return street;
+    }
+    public void setStreet(String street) {
+        this.street = street;
+    }
+    public String getZip() {
+        return zip;
+    }
+    public void setZip(String zip) {
+        this.zip = zip;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/8496831e/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
new file mode 100644
index 0000000..c7496aa
--- /dev/null
+++ b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
@@ -0,0 +1,84 @@
+/*
+ * #%L
+ * Wildfly Camel :: Testsuite
+ * %%
+ * Copyright (C) 2013 - 2014 RedHat
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package org.apache.camel.converter.dozer.model;
+
+
+public class CustomerB {
+
+    private String firstName;
+    private String lastName;
+    private Address address;
+
+    public CustomerB() {
+    }
+
+    public CustomerB(String firstName, String lastName, Address address) {
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.address = address;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+    public String getLastName() {
+        return lastName;
+    }
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+    public Address getAddress() {
+        return address;
+    }
+    public void setAddress(Address address) {
+        this.address = address;
+    }
+
+    public static class Address {
+
+        private String street;
+        private String zip;
+
+        public Address() {
+        }
+
+        public Address(String street, String zip) {
+            this.street = street;
+            this.zip = zip;
+        }
+
+        public String getStreet() {
+            return street;
+        }
+        public void setStreet(String street) {
+            this.street = street;
+        }
+        public String getZip() {
+            return zip;
+        }
+        public void setZip(String zip) {
+            this.zip = zip;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/8496831e/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml b/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml
new file mode 100644
index 0000000..92cdf53
--- /dev/null
+++ b/components/camel-dozer/src/test/resources/bean-to-bean-dozer-mappings.xml
@@ -0,0 +1,17 @@
+<mappings xmlns="http://dozer.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://dozer.sourceforge.net  http://dozer.sourceforge.net/schema/beanmapping.xsd">
+    
+    <mapping>
+        <class-a>org.apache.camel.converter.dozer.model.CustomerA</class-a>
+        <class-b>org.apache.camel.converter.dozer.model.CustomerB</class-b>
+        <field>
+            <a>street</a>
+            <b>address.street</b>
+        </field>
+        <field>
+            <a>zip</a>
+            <b>address.zip</b>
+        </field>
+    </mapping>
+    
+</mappings>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/8496831e/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml b/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml
new file mode 100644
index 0000000..bee5cb9
--- /dev/null
+++ b/components/camel-dozer/src/test/resources/bean-to-map-dozer-mappings.xml
@@ -0,0 +1,17 @@
+<mappings xmlns="http://dozer.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://dozer.sourceforge.net  http://dozer.sourceforge.net/schema/beanmapping.xsd">
+    
+    <mapping>
+        <class-a>org.apache.camel.converter.dozer.model.Customer</class-a>
+        <class-b>java.util.HashMap</class-b>
+        <field>
+            <a>firstName</a>
+            <b key="firstName">this</b>
+        </field>
+        <field>
+            <a>lastName</a>
+            <b key="lastName">this</b>
+        </field>
+    </mapping>
+    
+</mappings>
\ No newline at end of file


[2/2] camel git commit: Fixes #647. CAMEL-9227: Fixed CS

Posted by da...@apache.org.
Fixes #647. CAMEL-9227: Fixed CS


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

Branch: refs/heads/camel-2.16.x
Commit: eb9a9e332a2b0242f2800d7642cd6d69f66bee32
Parents: 8496831
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Oct 17 08:51:14 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Oct 17 08:52:32 2015 +0200

----------------------------------------------------------------------
 .../converter/dozer/DozerBeanMappingTest.java   | 46 +++++++++-----------
 .../camel/converter/dozer/model/CustomerA.java  | 26 ++++++-----
 .../camel/converter/dozer/model/CustomerB.java  | 27 +++++++-----
 3 files changed, 50 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/eb9a9e33/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
index 50ff0f3..f714418 100644
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
+++ b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/DozerBeanMappingTest.java
@@ -1,12 +1,10 @@
-/*
- * #%L
- * Wildfly Camel :: Testsuite
- * %%
- * Copyright (C) 2013 - 2014 RedHat
- * %%
- * Licensed 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
  *
@@ -15,9 +13,7 @@
  * 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.
- * #L%
  */
-
 package org.apache.camel.converter.dozer;
 
 import java.util.Arrays;
@@ -39,8 +35,8 @@ public class DozerBeanMappingTest {
     @Test
     public void testMarshalViaDozer() throws Exception {
 
-        CamelContext camelctx = new DefaultCamelContext();
-        camelctx.addRoutes(new RouteBuilder() {
+        CamelContext context = new DefaultCamelContext();
+        context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
                 from("direct:start").convertBodyTo(HashMap.class);
@@ -48,25 +44,25 @@ public class DozerBeanMappingTest {
         });
 
         DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
-        mconfig.setMappingFiles(Arrays.asList(new String[] { "bean-to-map-dozer-mappings.xml" }));
-        new DozerTypeConverterLoader(camelctx, mconfig);
+        mconfig.setMappingFiles(Arrays.asList("bean-to-map-dozer-mappings.xml"));
+        new DozerTypeConverterLoader(context, mconfig);
 
-        camelctx.start();
+        context.start();
         try {
-            ProducerTemplate producer = camelctx.createProducerTemplate();
+            ProducerTemplate producer = context.createProducerTemplate();
             Map<?, ?> result = producer.requestBody("direct:start", new Customer("John", "Doe", null), Map.class);
             Assert.assertEquals("John", result.get("firstName"));
             Assert.assertEquals("Doe", result.get("lastName"));
         } finally {
-            camelctx.stop();
+            context.stop();
         }
     }
 
     @Test
     public void testBeanMapping() throws Exception {
 
-        CamelContext camelctx = new DefaultCamelContext();
-        camelctx.addRoutes(new RouteBuilder() {
+        CamelContext context = new DefaultCamelContext();
+        context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
                 from("direct:start").convertBodyTo(CustomerB.class);
@@ -74,21 +70,21 @@ public class DozerBeanMappingTest {
         });
 
         DozerBeanMapperConfiguration mconfig = new DozerBeanMapperConfiguration();
-        mconfig.setMappingFiles(Arrays.asList(new String[] { "bean-to-bean-dozer-mappings.xml" }));
-        new DozerTypeConverterLoader(camelctx, mconfig);
+        mconfig.setMappingFiles(Arrays.asList("bean-to-bean-dozer-mappings.xml"));
+        new DozerTypeConverterLoader(context, mconfig);
 
         CustomerA customerA = new CustomerA("Peter", "Post", "SomeStreet", "12345");
 
-        camelctx.start();
+        context.start();
         try {
-            ProducerTemplate producer = camelctx.createProducerTemplate();
+            ProducerTemplate producer = context.createProducerTemplate();
             CustomerB result = producer.requestBody("direct:start", customerA, CustomerB.class);
             Assert.assertEquals(customerA.getFirstName(), result.getFirstName());
             Assert.assertEquals(customerA.getLastName(), result.getLastName());
             Assert.assertEquals(customerA.getStreet(), result.getAddress().getStreet());
             Assert.assertEquals(customerA.getZip(), result.getAddress().getZip());
         } finally {
-            camelctx.stop();
+            context.stop();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/eb9a9e33/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
index 22b9227..d4e98b9 100644
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
+++ b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerA.java
@@ -1,12 +1,10 @@
-/*
- * #%L
- * Wildfly Camel :: Testsuite
- * %%
- * Copyright (C) 2013 - 2014 RedHat
- * %%
- * Licensed 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
  *
@@ -15,12 +13,9 @@
  * 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.
- * #L%
  */
-
 package org.apache.camel.converter.dozer.model;
 
-
 public class CustomerA {
 
     private String firstName;
@@ -41,24 +36,31 @@ public class CustomerA {
     public String getFirstName() {
         return firstName;
     }
+
     public void setFirstName(String firstName) {
         this.firstName = firstName;
     }
+
     public String getLastName() {
         return lastName;
     }
+
     public void setLastName(String lastName) {
         this.lastName = lastName;
     }
+
     public String getStreet() {
         return street;
     }
+
     public void setStreet(String street) {
         this.street = street;
     }
+
     public String getZip() {
         return zip;
     }
+
     public void setZip(String zip) {
         this.zip = zip;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/eb9a9e33/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
index c7496aa..080274a 100644
--- a/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
+++ b/components/camel-dozer/src/test/java/org/apache/camel/converter/dozer/model/CustomerB.java
@@ -1,12 +1,10 @@
-/*
- * #%L
- * Wildfly Camel :: Testsuite
- * %%
- * Copyright (C) 2013 - 2014 RedHat
- * %%
- * Licensed 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
  *
@@ -15,12 +13,9 @@
  * 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.
- * #L%
  */
-
 package org.apache.camel.converter.dozer.model;
 
-
 public class CustomerB {
 
     private String firstName;
@@ -39,18 +34,23 @@ public class CustomerB {
     public String getFirstName() {
         return firstName;
     }
+
     public void setFirstName(String firstName) {
         this.firstName = firstName;
     }
+
     public String getLastName() {
         return lastName;
     }
+
     public void setLastName(String lastName) {
         this.lastName = lastName;
     }
+
     public Address getAddress() {
         return address;
     }
+
     public void setAddress(Address address) {
         this.address = address;
     }
@@ -71,12 +71,15 @@ public class CustomerB {
         public String getStreet() {
             return street;
         }
+
         public void setStreet(String street) {
             this.street = street;
         }
+
         public String getZip() {
             return zip;
         }
+
         public void setZip(String zip) {
             this.zip = zip;
         }