< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, 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 --- 1,7 ---- /* ! * Copyright (c) 1997, 2017, 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
*** 240,249 **** --- 240,259 ---- public final boolean fastBoot; private Set<XmlNs> xmlNsSet = null; /** + * If true, despite the specification, unmarshall child element with parent namespace, if child namespace is not specified. + * The default value is null for System {code}com.sun.xml.internal.bind.backupWithParentNamespace{code} property to be used, + * and false is assumed if it's not set either. + * + * Boolean + * @since 2.3.0 + */ + public Boolean backupWithParentNamespace = null; + + /** * Returns declared XmlNs annotations (from package-level annotation XmlSchema * * @return set of all present XmlNs annotations */ public Set<XmlNs> getXmlNsSet() {
*** 261,270 **** --- 271,281 ---- this.xmlAccessorFactorySupport = builder.xmlAccessorFactorySupport; this.allNillable = builder.allNillable; this.supressAccessorWarnings = builder.supressAccessorWarnings; this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling; this.disableSecurityProcessing = builder.disableSecurityProcessing; + this.backupWithParentNamespace = builder.backupWithParentNamespace; Collection<TypeReference> typeRefs = builder.typeRefs; boolean fastB; try {
*** 1022,1031 **** --- 1033,1043 ---- private Collection<TypeReference> typeRefs; private boolean xmlAccessorFactorySupport = false; private boolean allNillable; private boolean improvedXsiTypeHandling = true; private boolean disableSecurityProcessing = true; + private Boolean backupWithParentNamespace = null; // null for System property to be used public JAXBContextBuilder() {}; public JAXBContextBuilder(JAXBContextImpl baseImpl) { this.supressAccessorWarnings = baseImpl.supressAccessorWarnings;
*** 1037,1046 **** --- 1049,1059 ---- this.classes = baseImpl.classes; this.typeRefs = baseImpl.bridges.keySet(); this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport; this.allNillable = baseImpl.allNillable; this.disableSecurityProcessing = baseImpl.disableSecurityProcessing; + this.backupWithParentNamespace = baseImpl.backupWithParentNamespace; } public JAXBContextBuilder setRetainPropertyInfo(boolean val) { this.retainPropertyInfo = val; return this;
*** 1099,1108 **** --- 1112,1126 ---- public JAXBContextBuilder setDisableSecurityProcessing(boolean val) { this.disableSecurityProcessing = val; return this; } + public JAXBContextBuilder setBackupWithParentNamespace(Boolean backupWithParentNamespace) { + this.backupWithParentNamespace = backupWithParentNamespace; + return this; + } + public JAXBContextImpl build() throws JAXBException { // fool-proof if (this.defaultNsUri == null) { this.defaultNsUri = "";
< prev index next >