src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java

Print this page
rev 472 : 8036030: Update JAX-WS RI integration to latest version

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -63,11 +63,10 @@
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Result;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 
 import com.sun.istack.internal.NotNull;
 import com.sun.istack.internal.Pool;

@@ -88,11 +87,10 @@
 import com.sun.xml.internal.bind.v2.model.core.NonElement;
 import com.sun.xml.internal.bind.v2.model.core.Ref;
 import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl;
 import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
 import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeEnumLeafInfo;

@@ -116,11 +114,10 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * This class provides the implementation of JAXBContext.
  *
  */

@@ -361,30 +358,30 @@
         // register primitives for boxed types just to make GrammarInfo fool-proof
         for( Map.Entry<Class,Class> e : RuntimeUtil.primitiveToBox.entrySet() )
             beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) );
 
         // build bridges
-        ReflectionNavigator nav = typeSet.getNavigator();
+        Navigator<Type, Class, Field, Method> nav = typeSet.getNavigator();
 
         for (TypeReference tr : typeRefs) {
             XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
             Adapter<Type,Class> a=null;
             XmlList xl = tr.get(XmlList.class);
 
             // eventually compute the in-memory type
-            Class erasedType = nav.erasure(tr.type);
+            Class erasedType = (Class) nav.erasure(tr.type);
 
             if(xjta!=null) {
                 a = new Adapter<Type,Class>(xjta.value(),nav);
             }
             if(tr.get(XmlAttachmentRef.class)!=null) {
                 a = new Adapter<Type,Class>(SwaRefAdapter.class,nav);
                 hasSwaRef = true;
             }
 
             if(a!=null) {
-                erasedType = nav.erasure(a.defaultType);
+                erasedType = (Class) nav.erasure(a.defaultType);
             }
 
             Name name = nameBuilder.createElementName(tr.tagName);
 
             InternalBridge bridge;

@@ -875,11 +872,11 @@
             } else
             if(tr.type==CompositeStructure.class) {
                 // this is a special class we introduced for JAX-WS that we *don't* want in the schema
             } else {
                 NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
-                xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
+                xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
             }
         }
         return xsdgen;
     }