camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [1/3] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use
Date Thu, 08 Dec 2016 09:30:23 GMT
Repository: camel
Updated Branches:
  refs/heads/master 3c0b7d036 -> af3f54de3


CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use


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

Branch: refs/heads/master
Commit: 2b0e96117d6f01eba0c18e2ff8df6a438e819721
Parents: 3c0b7d0
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Thu Dec 8 09:51:19 2016 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Thu Dec 8 09:51:19 2016 +0100

----------------------------------------------------------------------
 .../camel/component/jackson/JacksonDataFormat.java      | 12 ++++++------
 .../jackson/JacksonMarshalUnmarshalTypeHeaderTest.java  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2b0e9611/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
index 4772619..ec7073f 100644
--- a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
+++ b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
@@ -68,7 +68,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat,
Dat
     private String enableFeatures;
     private String disableFeatures;
     private boolean enableJacksonTypeConverter;
-    private boolean allowJacksonUnmarshallType;
+    private boolean allowUnmarshallType;
 
     /**
      * Use the default Jackson {@link ObjectMapper} and {@link Object}
@@ -160,7 +160,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat,
Dat
         // is there a header with the unmarshal type?
         Class<?> clazz = unmarshalType;
         String type = null;
-        if (allowJacksonUnmarshallType) {
+        if (allowUnmarshallType) {
             type = exchange.getIn().getHeader(JacksonConstants.UNMARSHAL_TYPE, String.class);
         }
         if (type == null && isAllowJmsType()) {
@@ -331,8 +331,8 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat,
Dat
         this.enableJacksonTypeConverter = enableJacksonTypeConverter;
     }
     
-    public boolean isAllowJacksonUnmarshallType() {
-        return allowJacksonUnmarshallType;
+    public boolean isAllowUnmarshallType() {
+        return allowUnmarshallType;
     }
 
     /**
@@ -340,8 +340,8 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat,
Dat
      * <p/>
      * This should only be enabled when desired to be used.
      */
-    public void setAllowJacksonUnmarshallType(boolean allowJacksonUnmarshallType) {
-        this.allowJacksonUnmarshallType = allowJacksonUnmarshallType;
+    public void setAllowUnmarshallType(boolean allowJacksonUnmarshallType) {
+        this.allowUnmarshallType = allowJacksonUnmarshallType;
     }
 
     public String getEnableFeatures() {

http://git-wip-us.apache.org/repos/asf/camel/blob/2b0e9611/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
index 623b32e..775e7ea 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
@@ -46,7 +46,7 @@ public class JacksonMarshalUnmarshalTypeHeaderTest extends CamelTestSupport
{
             @Override
             public void configure() throws Exception {
                 JacksonDataFormat format = new JacksonDataFormat();
-                format.setAllowJacksonUnmarshallType(true);
+                format.setAllowUnmarshallType(true);
 
                 from("direct:backPojo").unmarshal(format).to("mock:reversePojo");
 


Mime
View raw message