From de5d93e16bd9869698195dbd259feb91f602e97a Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 2 Mar 2012 00:00:18 +0000 Subject: Reuse the ObjectMapper git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1296003 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sca-java-2.x') 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()); -- cgit v1.2.3