tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1170100 - /tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java
Date Tue, 13 Sep 2011 09:43:26 GMT
Author: slaws
Date: Tue Sep 13 09:43:26 2011
New Revision: 1170100

URL: http://svn.apache.org/viewvc?rev=1170100&view=rev
Log:
TUSCANY-3937 - Don't overwrite the default XMLType otherwise everything else that has the
default type gets to know about it. 

Modified:
    tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java

Modified: tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java?rev=1170100&r1=1170099&r2=1170100&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java
Tue Sep 13 09:43:26 2011
@@ -94,8 +94,10 @@ public class JAXBDataBinding extends Bas
         }
         
         // If DataType is already an XMLType it might have an element name that we wish to
preserve
+        // but check that we're not overwriting the UNKNOWN type
         Object logical = dataType.getLogical();
-        if (logical instanceof XMLType) {
+        if (logical instanceof XMLType &&
+            logical != XMLType.UNKNOWN) {
             ((XMLType)logical).setTypeName(xmlType.getTypeName());
         } else {
             dataType.setLogical(xmlType);            



Mime
View raw message