--- old/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2013-04-04 15:27:16.700612915 +0200 +++ new/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2013-04-04 15:27:16.644612914 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, 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 @@ -47,6 +47,7 @@ import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; +import java.util.HashMap; /** * {@link JAXBContext} enhanced with JAXB RI specific functionalities. @@ -93,7 +94,7 @@ @Nullable Map subclassReplacements, @Nullable String defaultNamespaceRemap, boolean c14nSupport, @Nullable RuntimeAnnotationReader ar) throws JAXBException { - return ContextFactory.createContext(classes, typeRefs, subclassReplacements, + return newInstance(classes, typeRefs, subclassReplacements, defaultNamespaceRemap, c14nSupport, ar, false, false, false, false); } @@ -135,9 +136,21 @@ @Nullable Map subclassReplacements, @Nullable String defaultNamespaceRemap, boolean c14nSupport, @Nullable RuntimeAnnotationReader ar, - boolean xmlAccessorFactorySupport, boolean allNillable, boolean retainPropertyInfo, boolean supressAccessorWarnings) throws JAXBException { - return ContextFactory.createContext(classes, typeRefs, subclassReplacements, - defaultNamespaceRemap, c14nSupport, ar, xmlAccessorFactorySupport, allNillable, retainPropertyInfo, supressAccessorWarnings); + boolean xmlAccessorFactorySupport, + boolean allNillable, + boolean retainPropertyInfo, + boolean supressAccessorWarnings) throws JAXBException { + Map properties = new HashMap(); + if (typeRefs != null) properties.put(JAXBRIContext.TYPE_REFERENCES, typeRefs); + if (subclassReplacements != null) properties.put(JAXBRIContext.SUBCLASS_REPLACEMENTS, subclassReplacements); + if (defaultNamespaceRemap != null) properties.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespaceRemap); + if (ar != null) properties.put(JAXBRIContext.ANNOTATION_READER, ar); + properties.put(JAXBRIContext.CANONICALIZATION_SUPPORT, Boolean.valueOf(c14nSupport)); + properties.put(JAXBRIContext.XMLACCESSORFACTORY_SUPPORT, Boolean.valueOf(xmlAccessorFactorySupport)); + properties.put(JAXBRIContext.TREAT_EVERYTHING_NILLABLE, Boolean.valueOf(allNillable)); + properties.put(JAXBRIContext.RETAIN_REFERENCE_TO_INFO, Boolean.valueOf(retainPropertyInfo)); + properties.put(JAXBRIContext.SUPRESS_ACCESSOR_WARNINGS, Boolean.valueOf(supressAccessorWarnings)); + return (JAXBRIContext) ContextFactory.createContext(classes, properties); } /** @@ -407,7 +420,6 @@ return Navigator.REFLECTION.getBaseClass(type,baseType); } - /** * The property that you can specify to {@link JAXBContext#newInstance} * to reassign the default namespace URI to something else at the runtime. @@ -441,6 +453,7 @@ * and {@link Marshaller#setProperty(String, Object)} * to enable the c14n marshalling support in the {@link JAXBContext}. * + * Boolean * @see C14nSupport_ArchitectureDocument * @since 2.0 EA2 */ @@ -451,6 +464,7 @@ * to allow unmarshaller to honor xsi:nil anywhere, even if they are * not specifically allowed by the schema. * + * Boolean * @since 2.1.3 */ public static final String TREAT_EVERYTHING_NILLABLE = "com.sun.xml.internal.bind.treatEverythingNillable"; @@ -492,6 +506,7 @@ /** * Retains references to PropertyInfos. * + * Boolean * @since 2.1.10 */ public static final String RETAIN_REFERENCE_TO_INFO = "retainReferenceToInfo"; @@ -499,6 +514,7 @@ /** * Supress security warnings when trying to access fields through reflection. * + * Boolean * @since 2.1.14, 2.2.2 */ public static final String SUPRESS_ACCESSOR_WARNINGS = "supressAccessorWarnings"; @@ -506,8 +522,17 @@ /** * Improves handling of xsi:type used on leaf properties. * + * Boolean * @since 2.2.3 */ public static final String IMPROVED_XSI_TYPE_HANDLING = "com.sun.xml.internal.bind.improvedXsiTypeHandling"; + /** + * If true XML security features when parsing XML documents will be disabled. + * The default value is false. + * + * Boolean + * @since 2.2.6 + */ + public static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity"; }