camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-8176: camel-jackson - Make it easier to register custom modules
Date Fri, 06 Mar 2015 06:36:23 GMT
Repository: camel
Updated Branches:
  refs/heads/master 2ecd1ba33 -> c544cfb4e


CAMEL-8176: camel-jackson - Make it easier to register custom modules


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

Branch: refs/heads/master
Commit: c544cfb4e5846facb922414793059818e81a2c07
Parents: 2ecd1ba
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Mar 6 07:37:40 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Mar 6 07:37:40 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/component/jackson/JacksonDataFormat.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c544cfb4/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 2e6b34a..fbdd2b7 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
@@ -250,6 +250,16 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat,
Cam
     }
 
     /**
+     * To use the custom Jackson module
+     */
+    public void addModule(Module module) {
+        if (this.modules == null) {
+            this.modules = new ArrayList<Module>();
+        }
+        this.modules.add(module);
+    }
+
+    /**
      * To use custom Jackson {@link Module}s specified as a String with FQN class names.
      * Multiple classes can be separated by comma.
      */


Mime
View raw message