diff options
Diffstat (limited to 'branches/sca-java-1.3.2/modules/databinding-jaxb-axiom')
-rw-r--r-- | branches/sca-java-1.3.2/modules/databinding-jaxb-axiom/src/main/java/org/apache/tuscany/sca/databinding/jaxb/axiom/OMElement2JAXB.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/branches/sca-java-1.3.2/modules/databinding-jaxb-axiom/src/main/java/org/apache/tuscany/sca/databinding/jaxb/axiom/OMElement2JAXB.java b/branches/sca-java-1.3.2/modules/databinding-jaxb-axiom/src/main/java/org/apache/tuscany/sca/databinding/jaxb/axiom/OMElement2JAXB.java index 827a1684bc..3753fd9d64 100644 --- a/branches/sca-java-1.3.2/modules/databinding-jaxb-axiom/src/main/java/org/apache/tuscany/sca/databinding/jaxb/axiom/OMElement2JAXB.java +++ b/branches/sca-java-1.3.2/modules/databinding-jaxb-axiom/src/main/java/org/apache/tuscany/sca/databinding/jaxb/axiom/OMElement2JAXB.java @@ -62,7 +62,9 @@ public class OMElement2JAXB extends BaseTransformer<OMElement, Object> implement reader = source.getXMLStreamReaderWithoutCaching(); result = unmarshaller.unmarshal(reader, JAXBContextHelper.getJavaType(context.getTargetDataType())); } finally { - reader.close(); + if (reader != null) { + reader.close(); + } JAXBContextHelper.releaseJAXBUnmarshaller(jaxbContext, unmarshaller); } return JAXBContextHelper.createReturnValue(jaxbContext, context.getTargetDataType(), result); |