From a6a65ad2db2b466494a1526d2266931fc3c5fa76 Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 16 Jul 2009 04:07:55 +0000 Subject: Turn SimpleTypeMapper into a utility so that the implementation-bepl can use it Fix the OSGi MF git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@794517 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'java/sca/modules/databinding-jaxb/src/main') diff --git a/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java b/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java index 03ee5c9dbd..58c8bdc175 100644 --- a/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java +++ b/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java @@ -40,6 +40,7 @@ import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; +import org.apache.tuscany.sca.databinding.SimpleTypeMapper; import org.apache.tuscany.sca.databinding.TransformationContext; import org.apache.tuscany.sca.databinding.TransformationException; import org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl; @@ -61,6 +62,7 @@ public final class JAXBContextHelper { // public static final String JAXB_CONTEXT_PATH = "jaxb.contextPath"; private static final JAXBContextCache cache = new JAXBContextCache(); + private static final SimpleTypeMapper SIMPLE_TYPE_MAPPER = new SimpleTypeMapperImpl(); private JAXBContextHelper() { } @@ -344,7 +346,7 @@ public final class JAXBContextHelper { } if (type == Object.class && dataType.getLogical() instanceof XMLType) { XMLType xType = (XMLType)dataType.getLogical(); - Class javaType = SimpleTypeMapperImpl.getJavaType(xType.getTypeName()); + Class javaType = SIMPLE_TYPE_MAPPER.getJavaType(xType.getTypeName()); if (javaType != null) { type = javaType; } -- cgit v1.2.3