diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-02 00:00:18 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-02 00:00:18 +0000 |
commit | de5d93e16bd9869698195dbd259feb91f602e97a (patch) | |
tree | e9bfdd08a2e604bb4cc09a1cba6363f1275411d6 /sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json | |
parent | 1145f9016edab7341e06afef3a815027041a61c1 (diff) |
Reuse the ObjectMapper
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1296003 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json')
-rw-r--r-- | sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java b/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java index b8ad9629fe..049907786c 100644 --- a/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java +++ b/sca-java-2.x/trunk/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java @@ -100,6 +100,9 @@ public class JacksonHelper { } } } + if ( cls != null && mapper == null ) { + return MAPPER; + } if (mapper == null) { mapper = new ObjectMapper(); mapper.registerModule(new JsonOrgModule()); |