--- old/src/java.xml.bind/share/classes/com/sun/istack/internal/logging/Logger.java 2015-10-16 12:57:34.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/istack/internal/logging/Logger.java 2015-10-16 12:57:34.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -37,7 +37,7 @@ * The class also makes sure that logger names of each Metro subsystem are consistent * with each other. * - * @author Marek Potociar + * @author Marek Potociar * @author Fabian Ritzmann */ public class Logger { @@ -335,7 +335,7 @@ /** * Method logs {@code exception}'s message as a {@code SEVERE} logging level * message. - *

+ *

* If {@code cause} parameter is not {@code null}, it is logged as well and * {@code exception} original cause is initialized with instance referenced * by {@code cause} parameter. @@ -363,7 +363,7 @@ /** * Method logs {@code exception}'s message as a {@code SEVERE} logging level * message. - *

+ *

* If {@code logCause} parameter is {@code true}, {@code exception}'s original * cause is logged as well (if exists). This may be used in cases when * {@code exception}'s class provides constructor to initialize the original @@ -408,7 +408,7 @@ /** * Method logs {@code exception}'s message at the logging level specified by the * {@code level} argument. - *

+ *

* If {@code cause} parameter is not {@code null}, it is logged as well and * {@code exception} original cause is initialized with instance referenced * by {@code cause} parameter. @@ -437,7 +437,7 @@ /** * Method logs {@code exception}'s message at the logging level specified by the * {@code level} argument. - *

+ *

* If {@code logCause} parameter is {@code true}, {@code exception}'s original * cause is logged as well (if exists). This may be used in cases when * {@code exception}'s class provides constructor to initialize the original --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/AccessorFactoryImpl.java 2015-10-16 12:57:35.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/AccessorFactoryImpl.java 2015-10-16 12:57:35.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -48,8 +48,6 @@ * @param field the field within the class to be accessed. * @param readOnly the isStatic value of the field's modifier. * @return Accessor the accessor for this field - * - * @throws JAXBException reports failures of the method. */ public Accessor createFieldAccessor(Class bean, Field field, boolean readOnly) { return readOnly @@ -65,8 +63,6 @@ * @param readOnly the isStatic value of the field's modifier. * @param supressWarning supress security warning about accessing fields through reflection * @return Accessor the accessor for this field - * - * @throws JAXBException reports failures of the method. */ public Accessor createFieldAccessor(Class bean, Field field, boolean readOnly, boolean supressWarning) { return readOnly @@ -81,8 +77,6 @@ * @param getter the getter method to be accessed. The value can be null. * @param setter the setter method to be accessed. The value can be null. * @return Accessor the accessor for these methods - * - * @throws JAXBException reports failures of the method. */ public Accessor createPropertyAccessor(Class bean, Method getter, Method setter) { if (getter == null) { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java 2015-10-16 12:57:35.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java 2015-10-16 12:57:35.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -81,7 +81,7 @@ } /** - * Faster but less robust String->int conversion. + * Faster but less robust {@code String->int} conversion. * * Note that: *

    @@ -115,7 +115,7 @@ } public static long _parseLong(CharSequence s) { - return Long.valueOf(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString()); + return Long.parseLong(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString()); } public static short _parseShort(CharSequence s) { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2015-10-16 12:57:36.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2015-10-16 12:57:36.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -270,12 +270,12 @@ * add element declarations to the generate schema. * For example, if the JAX-RPC passes in the following entry: * - * {foo}bar -> DeclaredType for java.lang.String + * {@code {foo}bar -> DeclaredType for java.lang.String} * * then JAXB generates the following element declaration (in the schema * document for the namespace "foo")" * - * <xs:element name="bar" type="xs:string" /> + * {@code } * * This can be used for generating schema components necessary for WSDL. * @@ -436,7 +436,7 @@ * to put additional JAXB type references into the {@link JAXBContext}. * *

    - * The value of the property is {@link Collection}<{@link TypeReference}>. + * The value of the property is {@link Collection}{@code <}{@link TypeReference}{@code >}. * Those {@link TypeReference}s can then be used to create {@link Bridge}s. * *

    @@ -453,7 +453,7 @@ * to enable the c14n marshalling support in the {@link JAXBContext}. * * Boolean - * @see C14nSupport_ArchitectureDocument + * See C14nSupport_ArchitectureDocument in JAXB Architecture Document * @since 2.0 EA2 */ public static final String CANONICALIZATION_SUPPORT = "com.sun.xml.internal.bind.c14n"; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/DataWriter.java 2015-10-16 12:57:37.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/DataWriter.java 2015-10-16 12:57:37.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -78,15 +78,15 @@ * *

    This code will produce the following document:

    * - *
    - * <?xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <Person>
    - *   <name>Jane Smith</name>
    - *   <date-of-birth>1965-05-23</date-of-birth>
    - *   <citizenship>US</citizenship>
    - * </Person>
    - * 
    + * + * Jane Smith + * 1965-05-23 + * US + * + * }
    * *

    This class inherits from {@link XMLWriter}, * and provides all of the same support for Namespaces.

    --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper.java 2015-10-16 12:57:38.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper.java 2015-10-16 12:57:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -44,7 +44,7 @@ // - don't remove any existing method. /** - * Implemented by the user application to determine URI -> prefix + * Implemented by the user application to determine URI {@code ->} prefix * mapping. * * This is considered as an interface, though it's implemented --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java 2015-10-16 12:57:38.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java 2015-10-16 12:57:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -91,11 +91,11 @@ * *

    The resulting document will look like this:

    * - *
    - * <?xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <greeting>Hello, world!</greeting>
    - * 
    + * Hello, world! + * }
    * *

    In fact, there is an even simpler convenience method, * dataElement, designed for writing elements that @@ -125,9 +125,9 @@ * *

    you will end up with

    * - *
    - * <item>1</item><item>3</item><item>3</item>
    - * 
    + *
    {@code
    + * 133
    + * }
    * *

    You need to invoke one of the characters methods * explicitly to add newlines or indentation. Alternatively, you @@ -154,11 +154,11 @@ * *

    The resulting document will look like this:

    * - *
    - * <?xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <_NS1:foo xmlns:_NS1="http://www.foo.com/ns/"/>
    - * 
    + * <_NS1:foo xmlns:_NS1="http://www.foo.com/ns/"/> + * }
    * *

    In many cases, document authors will prefer to choose their * own prefixes rather than using the (ugly) default names. The @@ -175,11 +175,11 @@ * *

    The resulting document will look like this:

    * - *
    - * <?xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <foo:foo xmlns:foo="http://www.foo.com/ns/"/>
    - * 
    + * + * }
    * *

    The default Namespace simply uses an empty string as the prefix:

    * @@ -192,28 +192,28 @@ * *

    The resulting document will look like this:

    * - *
    - * <?xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <foo xmlns="http://www.foo.com/ns/"/>
    - * 
    + * + * }
    * *

    By default, the XML writer will not declare a Namespace until * it is actually used. Sometimes, this approach will create * a large number of Namespace declarations, as in the following * example:

    * - *
    - * <xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    - *  <rdf:Description about="http://www.foo.com/ids/books/12345">
    - *   <dc:title xmlns:dc="http://www.purl.org/dc/">A Dark Night</dc:title>
    - *   <dc:creator xmlns:dc="http://www.purl.org/dc/">Jane Smith</dc:title>
    - *   <dc:date xmlns:dc="http://www.purl.org/dc/">2000-09-09</dc:title>
    - *  </rdf:Description>
    - * </rdf:RDF>
    - * 
    + * + * + * A Dark Night + * Jane Smith + * 2000-09-09 + * + * + * }
    * *

    The "rdf" prefix is declared only once, because the RDF Namespace * is used by the root element and can be inherited by all of its @@ -230,18 +230,18 @@ * though it's not needed there, and can be inherited by its * descendants:

    * - *
    - * <xml version="1.0" standalone="yes"?>
    + * 
    {@code
    + * 
      *
    - * <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    + * 
    - *  <rdf:Description about="http://www.foo.com/ids/books/12345">
    - *   <dc:title>A Dark Night</dc:title>
    - *   <dc:creator>Jane Smith</dc:title>
    - *   <dc:date>2000-09-09</dc:title>
    - *  </rdf:Description>
    - * </rdf:RDF>
    - * 
    + * + * A Dark Night + * Jane Smith + * 2000-09-09 + * + * + * }
    * *

    This approach is also useful for declaring Namespace prefixes * that be used by qualified names appearing in attribute values or @@ -372,7 +372,7 @@ /** * Set whether the writer should print out the XML declaration - * (<?xml version='1.0' ... ?>). + * ({@code }). *

    * This option is set to true by default. */ --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ClassFactory.java 2015-10-16 12:57:39.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ClassFactory.java 2015-10-16 12:57:39.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 @@ -87,25 +87,16 @@ if(consRef!=null) cons = consRef.get(); if(cons==null) { - cons = AccessController.doPrivileged(new PrivilegedAction>() { - @Override - public Constructor run() { - try { - return clazz.getDeclaredConstructor(emptyClass); - } catch (NoSuchMethodException e) { - logger.log(Level.INFO,"No default constructor found on "+clazz,e); - NoSuchMethodError exp; - if(clazz.getDeclaringClass()!=null && !Modifier.isStatic(clazz.getModifiers())) { - exp = new NoSuchMethodError(Messages.NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS - .format(clazz.getName())); - } else { - exp = new NoSuchMethodError(e.getMessage()); - } - exp.initCause(e); - throw exp; + if (System.getSecurityManager() == null) { + cons = tryGetDeclaredConstructor(clazz); + } else { + cons = AccessController.doPrivileged(new PrivilegedAction>() { + @Override + public Constructor run() { + return tryGetDeclaredConstructor(clazz); } - } - }); + }); + } int classMod = clazz.getModifiers(); @@ -126,6 +117,23 @@ return cons.newInstance(emptyObject); } + private static Constructor tryGetDeclaredConstructor(Class clazz) { + try { + return clazz.getDeclaredConstructor((Class[])emptyClass); + } catch (NoSuchMethodException e) { + logger.log(Level.INFO,"No default constructor found on "+clazz,e); + NoSuchMethodError exp; + if(clazz.getDeclaringClass()!=null && !Modifier.isStatic(clazz.getModifiers())) { + exp = new NoSuchMethodError(Messages.NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS + .format(clazz.getName())); + } else { + exp = new NoSuchMethodError(e.getMessage()); + } + exp.initCause(e); + throw exp; + } + } + /** * The same as {@link #create0} but with an error handling to make * the instantiation error fatal. --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java 2015-10-16 12:57:40.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java 2015-10-16 12:57:40.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -174,7 +174,7 @@ * @param retainPropertyInfo * @return * @throws JAXBException - * @deprecated use createContext(Class[] classes, Map properties) method instead + * @deprecated use {@code createContext(Class[] classes, Map properties)} method instead */ @Deprecated public static JAXBRIContext createContext( Class[] classes, @@ -201,7 +201,7 @@ * @param improvedXsiTypeHandling * @return * @throws JAXBException - * @deprecated use createContext( Class[] classes, Map properties) method instead + * @deprecated use {@code createContext( Class[] classes, Map properties)} method instead */ @Deprecated public static JAXBRIContext createContext( Class[] classes, --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/WellKnownNamespace.java 2015-10-16 12:57:41.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/WellKnownNamespace.java 2015-10-16 12:57:40.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -38,24 +38,18 @@ /** * @deprecated Use javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI instead; - * @return - * @throws CloneNotSupportedException */ @Deprecated() public static final String XML_SCHEMA = XMLConstants.W3C_XML_SCHEMA_NS_URI; /** * @deprecated Use javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI instead - * @return - * @throws CloneNotSupportedException */ @Deprecated() public static final String XML_SCHEMA_INSTANCE = XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI; /** * @deprecated Use javax.xml.XMLConstants.XML_NS_URI instead; - * @return - * @throws CloneNotSupportedException */ @Deprecated() public static final String XML_NAMESPACE_URI = XMLConstants.XML_NS_URI; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ElementInfo.java 2015-10-16 12:57:41.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ElementInfo.java 2015-10-16 12:57:41.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -72,7 +72,7 @@ T getContentInMemoryType(); /** - * Returns the representation for {@link JAXBElement}<contentInMemoryType>. + * Returns the representation for {@link JAXBElement}{@code };. * *

    * This returns the signature in Java and thus isn't affected by the adapter. @@ -80,7 +80,7 @@ T getType(); /** - * @inheritDoc + * {@inheritDoc} * * {@link ElementInfo} can only substitute {@link ElementInfo}. */ --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ElementPropertyInfo.java 2015-10-16 12:57:42.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ElementPropertyInfo.java 2015-10-16 12:57:42.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -51,12 +51,12 @@ * However, in a general case an element property can be heterogeneous, * meaning you can put different types in it, each with a different tag name * (and a few other settings.) - *

    +     * 
    {@code
          * // list can contain String or Integer.
          * @XmlElements({
          *   @XmlElement(name="a",type=String.class),
          *   @XmlElement(name="b",type=Integer.class),
    -     * }) {@code
    +     * })
          * List abc;
          * }
          * 

    --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java 2015-10-16 12:57:43.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java 2015-10-16 12:57:43.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -33,7 +33,8 @@ * Represents the information in a class with {@link XmlRegistry} annotaion. * *

    - * This interface is only meant to be used as a return type from {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}. + * This interface is only meant to be used as a return type from + * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}. * * @author Kohsuke Kawaguchi */ --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/package-info.java 2015-10-16 12:57:43.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/package-info.java 2015-10-16 12:57:43.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -36,25 +36,25 @@ * The meaning of parameterizations are as follows: * *

    - *
    T + *
    T
    *
    Represents an use of type, such as {@code int}, {@code Foo[]}, or {@code List}. - * Corresponds to {@link Type}. - * - *
    C + * Corresponds to {@link java.lang.reflect.Type}. +* + *
    C
    *
    Represents a declaration of a type (that is, class, interface, enum, or annotation.) * This doesn't include {@code int}, {@code Foo[]}, or {@code List}, because * they don't have corresponding declarations. - * Corresponds to {@link Class} (roughly). + * Corresponds to {@link java.lang.Class} (roughly).
    * - *
    F + *
    F
    *
    Represents a field. - * Corresponds to {@link Field}. + * Corresponds to {@link java.lang.reflect.Field}.
    * - *
    M + *
    M
    *
    Represents a method. - * Corresponds to {@link Method}. + * Corresponds to {@link java.lang.reflect.Method}.
    * - *
    + *
    */ @XmlSchema(namespace="http://jaxb.dev.java.net/xjc/model",elementFormDefault=QUALIFIED) package com.sun.xml.internal.bind.v2.model.core; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/ClassInfoImpl.java 2015-10-16 12:57:44.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/ClassInfoImpl.java 2015-10-16 12:57:44.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -419,7 +419,7 @@ } /** - * This hook is used by {@link RuntimeClassInfoImpl} to look for {@link XmlLocation}. + * This hook is used by {@link RuntimeClassInfoImpl} to look for {@link com.sun.xml.internal.bind.annotation.XmlLocation}. */ protected void checkFieldXmlLocation(F f) { } @@ -1245,7 +1245,7 @@ } /** - * Called after all the {@link TypeInfo}s are collected into the {@link #owner}. + * Called after all the {@link com.sun.xml.internal.bind.v2.model.core.TypeInfo}s are collected into the {@link #owner}. */ @Override /*package*/ void link() { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java 2015-10-16 12:57:45.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java 2015-10-16 12:57:45.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -25,6 +25,8 @@ package com.sun.xml.internal.bind.v2.model.impl; +import com.sun.xml.internal.bind.v2.model.core.PropertyInfo; + /** * {@link PropertyInfo} that allows to add additional elements to the collection. * --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeClassInfo.java 2015-10-16 12:57:46.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeClassInfo.java 2015-10-16 12:57:46.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -33,6 +33,7 @@ import javax.xml.namespace.QName; import com.sun.xml.internal.bind.v2.model.core.ClassInfo; +import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; import com.sun.xml.internal.bind.annotation.XmlLocation; @@ -58,7 +59,7 @@ * unoptimized accessor. * non-null iff {@link #hasAttributeWildcard()}==true. * - * @see Accessor#optimize() + * @see Accessor#optimize(JAXBContextImpl) */ Accessor> getAttributeWildcard(); --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimePropertyInfo.java 2015-10-16 12:57:46.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimePropertyInfo.java 2015-10-16 12:57:46.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -29,6 +29,7 @@ import java.util.Collection; import com.sun.xml.internal.bind.v2.model.core.PropertyInfo; +import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; /** @@ -58,7 +59,7 @@ * @return * never null. * - * @see Accessor#optimize() + * @see Accessor#optimize(JAXBContextImpl) */ Accessor getAccessor(); --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/package-info.java 2015-10-16 12:57:47.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/package-info.java 2015-10-16 12:57:47.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -28,7 +28,7 @@ * *

    Overview

    *

    - * This module provides code that implements {@link JAXBContext}. + * This module provides code that implements {@link javax.xml.bind.JAXBContext}. * Roughly speaking the runtime works like this: * *

      @@ -37,7 +37,7 @@ *
    1. There's a set of classes that constitute the unmarshaller and marshaller. * Each class represents a small portion, and they are composed to perform * the operations. - *
    2. {@link JAXBContextImpl} builds itself by reading the model and + *
    3. {@link com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl} builds itself by reading the model and * composing unmarshallers and marshallers. *
    * @@ -68,7 +68,7 @@ * packages of the binding model. * *
    - * + * *
    * *

    @@ -109,13 +109,13 @@ * For more details, see the javadoc of each component. * *

    - * + * *
    * * TODO: link to classes from above pictures * * - *

    Evolution Rules

    + *

    Evolution Rules

    * None of the class in this package or below should be directly * referenced by the generated code. Hence they can be changed freely * from versions to versions. @@ -125,7 +125,7 @@ * *

    Performance Characteristics

    *

    - * Model construction happens inside {@link JAXBContext#newInstance(Class[])}. + * Model construction happens inside {@link javax.xml.bind.JAXBContext#newInstance(Class[])}. * It's desirable for this step to be fast and consume less memory, * but it's not too performance sensitive. * @@ -139,10 +139,10 @@ * *

    Bootstrap Sequence

    *

    - * The following picture illustrates how the {@link JAXBContext#newInstance(Class[])} method + * The following picture illustrates how the {@link javax.xml.bind.JAXBContext#newInstance(Class[])} method * triggers activities. * - * {@SequenceDiagram + * {@code SequenceDiagram boxwid=1.2; pobject(U,"user"); @@ -177,6 +177,6 @@ complete(A); * } * - * @ArchitectureDocument + * It's part of ArchitectureDocument. */ package com.sun.xml.internal.bind.v2; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java 2015-10-16 12:57:48.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java 2015-10-16 12:57:48.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -66,7 +66,7 @@ private final Map> byPeer = new IdentityHashMap>(); private final Set usedNodes = new HashSet(); - /** Records the new element<->inner peer association. */ + /** Records the new {@code element <->inner} peer association. */ public void addInner( XmlNode element, Object inner ) { Entry e = byElement.get(element); if(e!=null) { @@ -90,7 +90,7 @@ } } - /** Records the new element<->outer peer association. */ + /** Records the new {@code element <-> outer} peer association. */ public void addOuter( XmlNode element, Object outer ) { Entry e = byElement.get(element); if(e!=null) { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java 2015-10-16 12:57:48.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java 2015-10-16 12:57:48.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -78,6 +78,9 @@ import com.sun.xml.internal.bind.v2.util.FatalAdapter; import java.net.URISyntaxException; +import java.util.logging.Level; +import java.util.logging.Logger; + import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.SAXException; @@ -95,6 +98,8 @@ */ public /*to make unit tests happy*/ final class MarshallerImpl extends AbstractMarshallerImpl implements ValidationEventHandler { + private static final Logger LOGGER = Logger.getLogger(MarshallerImpl.class.getName()); + /** Indentation string. Default is four whitespaces. */ private String indent = " "; @@ -327,12 +332,14 @@ toBeFlushed.flush(); } catch (IOException e) { // ignore + LOGGER.log(Level.SEVERE, e.getMessage(), e); } if(toBeClosed!=null) try { toBeClosed.close(); } catch (IOException e) { // ignore + LOGGER.log(Level.SEVERE, e.getMessage(), e); } toBeFlushed = null; toBeClosed = null; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/NamespaceContext2.java 2015-10-16 12:57:49.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/NamespaceContext2.java 2015-10-16 12:57:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -30,7 +30,7 @@ import com.sun.istack.internal.NotNull; /** - * Maintains namespace<->prefix bindings. + * Maintains {@code namespace <-> prefix} bindings. * *

    * This interface extends {@link NamespaceContext} and provides --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/RuntimeUtil.java 2015-10-16 12:57:50.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/RuntimeUtil.java 2015-10-16 12:57:50.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -53,7 +53,7 @@ * Map from {@link Class} objects representing primitive types * to {@link Class} objects representing their boxed types. *

    - * e.g., int -> Integer. + * e.g., {@code int -> Integer}. */ public static final Map boxToPrimitive; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java 2015-10-16 12:57:51.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java 2015-10-16 12:57:50.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -42,7 +42,7 @@ import org.xml.sax.SAXException; /** - * {@link XmlOutput} for {@link LowLevelStAXDocumentSerializer}. + * {@link XmlOutput} for {@link StAXDocumentSerializer}. *

    * This class is responsible for managing the indexing of elements, attributes * and local names that are known to JAXB by way of the JAXBContext (generated @@ -99,7 +99,7 @@ /** * Create a new set of tables for a JAXB context. *

    - * @param content the JAXB context. + * @param context the JAXB context. * @param initialIndexOffset the initial index offset to calculate * the maximum possible index * @@ -124,7 +124,7 @@ /** * Clear or reset the tables. *

    - * @param initialIndexOffset the initial index offset to calculate + * @param intialIndexOffset the initial index offset to calculate * the maximum possible index */ public void clearOrResetTables(int intialIndexOffset) { @@ -202,7 +202,7 @@ * Holder of JAXB contexts -> tables. *

    * An instance will be registered with the - * {@link LowLevelStAXDocumentSerializer}. + * {@link StAXDocumentSerializer}. */ final static class AppData implements VocabularyApplicationData { final Map contexts = --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/NamespaceContextImpl.java 2015-10-16 12:57:51.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/NamespaceContextImpl.java 2015-10-16 12:57:51.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -366,8 +366,8 @@ * This model of namespace declarations maintain the following invariants. * *

      - *
    • If a non-empty prefix is declared, it will never be reassigned to different namespace URIs. - *
    • + *
    • If a non-empty prefix is declared, it will never be reassigned to different namespace URIs.
    • + *
    */ public final class Element { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java 2015-10-16 12:57:52.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java 2015-10-16 12:57:52.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -78,9 +78,9 @@ protected int octetBufferIndex; /** - * Set to true to indicate that we need to write '>' + * Set to true to indicate that we need to write {@code '>'} * to close a start tag. Deferring the write of this char - * allows us to write "/>" for empty elements. + * allows us to write {@code "/>"} for empty elements. */ protected boolean closeStartTagPending = false; @@ -129,7 +129,7 @@ } /** - * Writes '>' to close the start tag, if necessary. + * Writes {@code '>'} to close the start tag, if necessary. */ protected final void closeStartTag() throws IOException { if(closeStartTagPending) { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutput.java 2015-10-16 12:57:53.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutput.java 2015-10-16 12:57:53.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -158,7 +158,7 @@ * * @param value * this string can contain characters that might need escaping - * (such as '&' or '>') + * (such as {@code '&' or '>'}) * @param needsSeparatingWhitespace */ public void text( String value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException; @@ -168,7 +168,7 @@ * * @param value * this string can contain characters that might need escaping - * (such as '&' or '>') + * (such as {@code '&' or '>'}) * @param needsSeparatingWhitespace */ public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java 2015-10-16 12:57:53.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java 2015-10-16 12:57:53.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -56,13 +56,13 @@ /** * Accesses a particular property of a bean. - *

    - *

    + *

    + *

    * This interface encapsulates the access to the actual data store. * The intention is to generate implementations for a particular bean * and a property to improve the performance. - *

    - *

    + *

    + *

    * Accessor can be used as a receiver. Upon receiving an object * it sets that to the field. * @@ -119,7 +119,7 @@ /** * Sets the value without adapting the value. - *

    + *

    * This ugly entry point is only used by JAX-WS. * See {@link JAXBRIContext#getElementPropertyAccessor} */ @@ -129,7 +129,7 @@ /** * Returns true if this accessor wraps an adapter. - *

    + *

    * This method needs to be used with care, but it helps some optimization. */ public boolean isAdapted() { @@ -138,7 +138,7 @@ /** * Sets the value without adapting the value. - *

    + *

    * This ugly entry point is only used by JAX-WS. * See {@link JAXBRIContext#getElementPropertyAccessor} */ @@ -394,8 +394,8 @@ /** * A version of {@link GetterSetterReflection} that doesn't have any setter. - *

    - *

    + *

    + *

    * This provides a user-friendly error message. */ public static class GetterOnlyReflection extends GetterSetterReflection { @@ -411,8 +411,8 @@ /** * A version of {@link GetterSetterReflection} thaat doesn't have any getter. - *

    - *

    + *

    + *

    * This provides a user-friendly error message. */ public static class SetterOnlyReflection extends GetterSetterReflection { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java 2015-10-16 12:57:54.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java 2015-10-16 12:57:54.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -33,7 +33,8 @@ import org.w3c.dom.Node; /** - * Object that returns the current location that the {@link XmlVisitor} is parsing. + * Object that returns the current location that the {@link com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor} + * is parsing. * * @author Kohsuke Kawaguchi */ --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java 2015-10-16 12:57:55.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java 2015-10-16 12:57:55.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -66,6 +66,7 @@ import java.util.logging.Logger; import org.xml.sax.ErrorHandler; +import org.xml.sax.Locator; import org.xml.sax.SAXException; import org.xml.sax.helpers.LocatorImpl; --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XmlVisitor.java 2015-10-16 12:57:56.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XmlVisitor.java 2015-10-16 12:57:56.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -145,7 +145,7 @@ *

    * If this method returns true, all the whitespaces are considered significant * and thus need to be reported as a {@link XmlVisitor#text} event. Furthermore, - * if the element has no children (like <foo/>), then it has to be reported + * if the element has no children (like {@code }), then it has to be reported * an empty {@link XmlVisitor#text} event. */ boolean expectText(); --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/Util.java 2015-10-16 12:57:56.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/Util.java 2015-10-16 12:57:56.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -75,12 +75,13 @@ /** * Calculate the normalized form of the given uriPath. - * - * For example: + *

    + * For example:

    {@code
          *    /a/b/c/ -> /a/b/c/
          *    /a/b/c  -> /a/b/
          *    /a/     -> /a/
          *    /a      -> /
    +     *    }
    * * @param uriPath path of a URI (as returned by java.net.URI#getPath() * @return the normalized uri path --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java 2015-10-16 12:57:57.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java 2015-10-16 12:57:57.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -37,6 +37,8 @@ public static CleanUpExecutorFactory newInstance() { try { return (CleanUpExecutorFactory) FactoryFinder.find(DEFAULT_PROPERTY_NAME); + } catch (RuntimeException e) { + return null; } catch (Exception e) { return null; } --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java 2015-10-16 12:57:58.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java 2015-10-16 12:57:58.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -39,9 +39,12 @@ public final class DecodingException extends IOException { /** - * Constructor + * Constructs a {@code DecodingException} with the specified detail message. + * + * @param message + * The detail message */ - public DecodingException(String s) { - super(s); + public DecodingException(String message) { + super(message); } } --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java 2015-10-16 12:57:59.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java 2015-10-16 12:57:58.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.logging.Level; import java.util.logging.Logger; @@ -70,11 +71,7 @@ String factoryClassName; BufferedReader rd = null; try { - try { - rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); - } catch (java.io.UnsupportedEncodingException e) { - rd = new BufferedReader(new InputStreamReader(is)); - } + rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); try { factoryClassName = rd.readLine(); } catch (IOException x) { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java 2015-10-16 12:57:59.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java 2015-10-16 12:57:59.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -37,6 +37,9 @@ * @author Kohsuke Kawaguchi */ final class FinalArrayList extends ArrayList { + + private static final long serialVersionUID = 7996571518730043311L; + public FinalArrayList(int initialCapacity) { super(initialCapacity); } --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java 2015-10-16 12:58:00.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java 2015-10-16 12:58:00.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -119,11 +119,12 @@ } /** - * @param dir + * @param directory + * temp directory */ - public final void setDir(String dir) { - if (tempDir == null && dir != null && !dir.equals("")) { - tempDir = new File(dir); + public final void setDir(String directory) { + if (tempDir == null && directory != null && !directory.equals("")) { + tempDir = new File(directory); } } @@ -143,7 +144,9 @@ LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath()); } } - } catch(Exception ioe) { + } catch(RuntimeException e) { + memoryThreshold = -1L; // whole attachment will be in-memory + } catch(Exception e) { memoryThreshold = -1L; // whole attachment will be in-memory } } --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java 2015-10-16 12:58:01.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java 2015-10-16 12:58:01.000000000 +0200 @@ -62,7 +62,10 @@ private final Map partsMap = new HashMap(); /** - * @see MIMEMessage(InputStream, String, MIMEConfig) + * @see #MIMEMessage(InputStream, String, MIMEConfig) + * + * @param in MIME message stream + * @param boundary the separator for parts(pass it without --) */ public MIMEMessage(InputStream in, String boundary) { this(in, boundary, new MIMEConfig()); @@ -131,7 +134,7 @@ * do the validation, the message needs to be parsed. The parsing of the * message is done lazily and is done while reading the bytes of the part. * - * @param contentId Content-ID of the part, expects Content-ID without <, > + * @param contentId Content-ID of the part, expects Content-ID without {@code <, >} * @return attachemnt part */ public MIMEPart getPart(String contentId) { @@ -177,8 +180,8 @@ /** * Closes all parsed {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEPart parts}. * This method is safe to call even if parsing of message failed. - *

    - * Does not throw {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEParsingException} if an + * + *

    Does not throw {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEParsingException} if an * error occurred during closing a MIME part. The exception (if any) is * still logged. */ --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java 2015-10-16 12:58:01.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java 2015-10-16 12:58:01.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -123,6 +123,11 @@ @Override public MIMEEvent next() { + + if (parsed) { + throw new NoSuchElementException(); + } + switch(state) { case START_MESSAGE : if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_MESSAGE);} --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java 2015-10-16 12:58:02.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java 2015-10-16 12:58:02.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -25,6 +25,9 @@ package com.sun.xml.internal.org.jvnet.mimepull; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; import java.util.concurrent.TimeUnit; import java.io.File; @@ -133,10 +136,12 @@ refList.remove(this); try { raf.close(); - boolean renamed = file.renameTo(f); + Path target = Files.move(file.toPath(), f.toPath(), StandardCopyOption.REPLACE_EXISTING); + boolean renamed = f.toPath().equals(target); if (!renamed) { if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.log(Level.INFO, "File {0} was not moved to {1}", new Object[] {file.getAbsolutePath(), f.getAbsolutePath()}); + throw new MIMEParsingException("File " + file.getAbsolutePath() + + " was not moved to " + f.getAbsolutePath()); } } } catch(IOException ioe) { --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/staxex/util/XMLStreamReaderToXMLStreamWriter.java 2015-10-16 12:58:03.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/staxex/util/XMLStreamReaderToXMLStreamWriter.java 2015-10-16 12:58:03.000000000 +0200 @@ -210,7 +210,7 @@ int nsCount = in.getNamespaceCount(); for (int i = 0; i < nsCount; i++) { out.writeNamespace( - in.getNamespacePrefix(i), + fixNull(in.getNamespacePrefix(i)), //StAX reader will return null for default NS fixNull(in.getNamespaceURI(i))); // zephyr doesn't like null, I don't know what is correct, so just fix null to "" for now } --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2/Document.java 2015-10-16 12:58:03.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2/Document.java 2015-10-16 12:58:03.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, 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 @@ -91,7 +91,7 @@ } /** - * Defines additional user object -> string conversion logic. + * Defines additional user object {@code ->} string conversion logic. * *

    * Applications can add their own {@link DatatypeWriter} so that --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2/output/ResultFactory.java 2015-10-16 12:58:04.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2/output/ResultFactory.java 2015-10-16 12:58:04.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, 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 @@ -43,7 +43,7 @@ private ResultFactory() {} /** - * Factory method for producing {@link XmlSerializer) from {@link javax.xml.transform.Result}. + * Factory method for producing {@link XmlSerializer} from {@link javax.xml.transform.Result}. * * This method supports {@link javax.xml.transform.sax.SAXResult}, * {@link javax.xml.transform.stream.StreamResult}, and {@link javax.xml.transform.dom.DOMResult}. --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2/output/XMLWriter.java 2015-10-16 12:58:05.000000000 +0200 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2/output/XMLWriter.java 2015-10-16 12:58:05.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, 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 @@ -94,7 +94,7 @@ *

    The resulting document will look like this:

    * *
    {@code
    - * 
    + *  
      *
      * Hello, world!
      * }
    @@ -168,7 +168,7 @@ * *
      *
    1. the qualified name
    2. - *
    3. the {@link #setPrefix setPrefix} method.
    4. + *
    5. the {@link #startPrefixMapping(String, String)} method.
    6. *
    * *

    Whenever the XML writer finds a new Namespace URI, it checks --- old/src/java.xml.bind/share/classes/javax/xml/bind/Marshaller.java 2015-10-16 12:58:06.000000000 +0200 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/Marshaller.java 2015-10-16 12:58:06.000000000 +0200 @@ -372,8 +372,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null @@ -394,8 +394,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null @@ -416,8 +416,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null @@ -439,8 +439,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null @@ -461,8 +461,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null @@ -510,8 +510,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null @@ -534,8 +534,8 @@ * @throws MarshalException * If the {@link ValidationEventHandler ValidationEventHandler} * returns false from its {@code handleEvent} method or the - * {@code Marshaller} is unable to marshal {@code obj} (or any - * object reachable from {@code obj}). See + * {@code Marshaller} is unable to marshal {@code jaxbElement} (or any + * object reachable from {@code jaxbElement}). See * Marshalling a JAXB element. * @throws IllegalArgumentException * If any of the method parameters are null --- old/src/java.xml.ws/share/classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java 2015-10-16 12:58:06.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java 2015-10-16 12:58:06.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -41,6 +41,8 @@ { private static final MessageContextFactory DEFAULT = new com.sun.xml.internal.ws.api.message.MessageContextFactory(new WebServiceFeature[0]); + protected com.sun.xml.internal.ws.api.message.saaj.SAAJFactory saajFactory = null; + protected abstract MessageContextFactory newFactory(WebServiceFeature ... f); public abstract MessageContext createContext(); @@ -127,4 +129,8 @@ private static interface Creator { public MessageContext create(MessageContextFactory f); } + + public void setSAAJFactory(com.sun.xml.internal.ws.api.message.saaj.SAAJFactory saajFactory) { + this.saajFactory = saajFactory; + } } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java 2015-10-16 12:58:07.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java 2015-10-16 12:58:07.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -50,9 +50,7 @@ class HttpSOAPConnection extends SOAPConnection { public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url"); - private static final String sunVmVendor = "http://java.sun.com/"; private static final String ibmVmVendor = "http://www.ibm.com/"; - private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false; private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false; private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint"; @@ -95,7 +93,7 @@ throw new SOAPExceptionImpl("Connection is closed"); } - Class urlEndpointClass = null; + Class urlEndpointClass = null; ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { if (loader != null) { @@ -198,7 +196,7 @@ MimeHeaders headers = message.getMimeHeaders(); - Iterator it = headers.getAllHeaders(); + Iterator it = headers.getAllHeaders(); boolean hasAuth = false; // true if we find explicit Auth header while (it.hasNext()) { MimeHeader header = (MimeHeader) it.next(); @@ -209,7 +207,7 @@ header.getName(), header.getValue()); else { - StringBuffer concat = new StringBuffer(); + StringBuilder concat = new StringBuilder(); int i = 0; while (i < values.length) { if (i != 0) @@ -355,7 +353,7 @@ log.severe("SAAJ0011.p2p.get.already.closed.conn"); throw new SOAPExceptionImpl("Connection is closed"); } - Class urlEndpointClass = null; + Class urlEndpointClass = null; try { urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint"); @@ -441,7 +439,7 @@ httpConnection.setDoOutput(true); httpConnection.setDoInput(true); httpConnection.setUseCaches(false); - httpConnection.setFollowRedirects(true); + httpConnection.setInstanceFollowRedirects(true); httpConnection.connect(); @@ -591,7 +589,7 @@ log.log(Level.FINE, "SAAJ0054.p2p.set.providers", new String[] { pkgs }); try { - Class c = Class.forName(SSL_PROVIDER); + Class c = Class.forName(SSL_PROVIDER); Provider p = (Provider) c.newInstance(); Security.addProvider(p); if (log.isLoggable(Level.FINE)) --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java 2015-10-16 12:58:08.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java 2015-10-16 12:58:08.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -121,7 +121,7 @@ return super.getMessage(); Exception n = next; String s = super.getMessage(); - StringBuffer sb = new StringBuffer(s == null ? "" : s); + StringBuilder sb = new StringBuilder(s == null ? "" : s); while (n != null) { sb.append(";\n nested exception is:\n\t"); if (n instanceof MessagingException) { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java 2015-10-16 12:58:08.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java 2015-10-16 12:58:08.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -705,7 +705,7 @@ String bnd = "--" + contentType.getParameter("boundary"); for (int i = 0; i < parts.size(); i++) { OutputUtil.writeln(bnd, os); // put out boundary - ((MimeBodyPart)parts.get(i)).writeTo(os); + parts.get(i).writeTo(os); OutputUtil.writeln(os); // put out empty line } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java 2015-10-16 12:58:09.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java 2015-10-16 12:58:09.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -169,7 +169,7 @@ if (list == null) return disposition; - StringBuffer sb = new StringBuffer(disposition); + StringBuilder sb = new StringBuilder(disposition); // append the parameter list // use the length of the string buffer + the length of --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java 2015-10-16 12:58:10.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java 2015-10-16 12:58:10.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -204,7 +204,7 @@ if (primaryType == null || subType == null) // need both return null; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(primaryType).append('/').append(subType); if (list != null) // Http Binding section of the "SOAP with attachments" specification says, --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java 2015-10-16 12:58:10.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java 2015-10-16 12:58:10.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -346,7 +346,7 @@ * quoted string. */ private static String filterToken(String s, int start, int end) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); char c; boolean gotEscape = false; boolean gotCR = false; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java 2015-10-16 12:58:11.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java 2015-10-16 12:58:11.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -73,12 +73,12 @@ */ public final class InternetHeaders { - private final FinalArrayList headers = new FinalArrayList(); + private final FinalArrayList headers = new FinalArrayList(); /** * Lazily cerated view of header lines (Strings). */ - private List headerValueView; + private List headerValueView; /** * Create an empty InternetHeaders object. @@ -119,7 +119,7 @@ LineInputStream lis = new LineInputStream(is); String prevline = null; // the previous header line, as a string // a buffer to accumulate the header in, when we know it's needed - StringBuffer lineBuffer = new StringBuffer(); + StringBuilder lineBuffer = new StringBuilder(); try { //while ((line = lis.readLine()) != null) { @@ -161,11 +161,11 @@ */ public String[] getHeader(String name) { // XXX - should we just step through in index order? - FinalArrayList v = new FinalArrayList(); // accumulate return values + FinalArrayList v = new FinalArrayList(); // accumulate return values int len = headers.size(); for( int i=0; i= 0; i--) { - hdr h = (hdr) headers.get(i); + hdr h = headers.get(i); if (name.equalsIgnoreCase(h.name)) { headers.add(i + 1, new hdr(name, value)); return; @@ -271,7 +271,7 @@ */ public void removeHeader(String name) { for (int i = 0; i < headers.size(); i++) { - hdr h = (hdr) headers.get(i); + hdr h = headers.get(i); if (name.equalsIgnoreCase(h.name)) { headers.remove(i); i--; // have to look at i again @@ -285,7 +285,7 @@ * * @return Header objects */ - public FinalArrayList getAllHeaders() { + public FinalArrayList getAllHeaders() { return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here } @@ -302,7 +302,7 @@ try { char c = line.charAt(0); if (c == ' ' || c == '\t') { - hdr h = (hdr) headers.get(headers.size() - 1); + hdr h = headers.get(headers.size() - 1); h.line += "\r\n" + line; } else headers.add(new hdr(line)); @@ -317,11 +317,11 @@ /** * Return all the header lines as a collection */ - public List getAllHeaderLines() { + public List getAllHeaderLines() { if(headerValueView==null) - headerValueView = new AbstractList() { - public Object get(int index) { - return ((hdr)headers.get(index)).line; + headerValueView = new AbstractList() { + public String get(int index) { + return headers.get(index).line; } public int size() { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java 2015-10-16 12:58:12.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java 2015-10-16 12:58:12.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -37,8 +37,6 @@ import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.activation.DataHandler; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; @@ -526,7 +524,7 @@ // Tokenize the header to obtain the Language-tags (skip comments) HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME); - FinalArrayList v = new FinalArrayList(); + FinalArrayList v = new FinalArrayList(); HeaderTokenizer.Token tk; int tkType; @@ -544,7 +542,7 @@ if (v.size() == 0) return null; - return (String[])v.toArray(new String[v.size()]); + return v.toArray(new String[v.size()]); } /** @@ -554,7 +552,7 @@ * @param languages array of language tags */ public void setContentLanguage(String[] languages) { - StringBuffer sb = new StringBuffer(languages[0]); + StringBuilder sb = new StringBuilder(languages[0]); for (int i = 1; i < languages.length; i++) sb.append(',').append(languages[i]); setHeader("Content-Language", sb.toString()); @@ -943,10 +941,10 @@ throws IOException, MessagingException { // First, write out the header - List hdrLines = headers.getAllHeaderLines(); + List hdrLines = headers.getAllHeaderLines(); int sz = hdrLines.size(); for( int i=0; i getAllHeaders() { return headers.getAllHeaders(); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java 2015-10-16 12:58:13.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java 2015-10-16 12:58:12.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -93,7 +93,7 @@ /** * Vector of MimeBodyPart objects. */ - protected FinalArrayList parts = new FinalArrayList(); // Holds BodyParts + protected FinalArrayList parts = new FinalArrayList(); // Holds BodyParts /** * This field specifies the content-type of this multipart @@ -212,7 +212,7 @@ if (parts == null) throw new IndexOutOfBoundsException("No such BodyPart"); - return (MimeBodyPart)parts.get(index); + return parts.get(index); } /** @@ -259,7 +259,7 @@ */ protected void updateHeaders() throws MessagingException { for (int i = 0; i < parts.size(); i++) - ((MimeBodyPart)parts.get(i)).updateHeaders(); + parts.get(i).updateHeaders(); } /** @@ -596,7 +596,7 @@ if (parts == null) throw new IndexOutOfBoundsException("No such BodyPart"); - MimeBodyPart part = (MimeBodyPart)parts.get(index); + MimeBodyPart part = parts.get(index); parts.remove(index); part.setParent(null); } @@ -609,7 +609,7 @@ */ public synchronized void addBodyPart(MimeBodyPart part) { if (parts == null) - parts = new FinalArrayList(); + parts = new FinalArrayList(); parts.add(part); part.setParent(this); @@ -627,7 +627,7 @@ */ public synchronized void addBodyPart(MimeBodyPart part, int index) { if (parts == null) - parts = new FinalArrayList(); + parts = new FinalArrayList(); parts.add(index,part); part.setParent(this); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java 2015-10-16 12:58:13.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java 2015-10-16 12:58:13.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -31,7 +31,6 @@ import java.io.InputStream; import java.util.List; import javax.activation.DataSource; -import javax.xml.soap.AttachmentPart; import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig; import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage; import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java 2015-10-16 12:58:14.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java 2015-10-16 12:58:14.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -510,8 +510,8 @@ // Encoded words found. Start decoding ... st = new StringTokenizer(etext, lwsp, true); - StringBuffer sb = new StringBuffer(); // decode buffer - StringBuffer wsb = new StringBuffer(); // white space buffer + StringBuilder sb = new StringBuilder(); // decode buffer + StringBuilder wsb = new StringBuilder(); // white space buffer boolean prevWasEncoded = false; while (st.hasMoreTokens()) { @@ -648,7 +648,7 @@ throw new UnsupportedEncodingException( "Unknown transfer encoding: " + encoding); - StringBuffer outb = new StringBuffer(); // the output buffer + StringBuilder outb = new StringBuilder(); // the output buffer doEncode(string, b64, jcharset, // As per RFC 2047, size of an encoded string should not // exceed 75 bytes. @@ -662,7 +662,7 @@ private static void doEncode(String string, boolean b64, String jcharset, int avail, String prefix, - boolean first, boolean encodingWord, StringBuffer buf) + boolean first, boolean encodingWord, StringBuilder buf) throws UnsupportedEncodingException { // First find out what the length of the encoded version of @@ -812,7 +812,7 @@ private static String decodeInnerWords(String word) throws UnsupportedEncodingException { int start = 0, i; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); while ((i = word.indexOf("=?", start)) >= 0) { buf.append(word.substring(start, i)); int end = word.indexOf("?=", i); @@ -862,7 +862,7 @@ char c = word.charAt(i); if (c == '"' || c == '\\' || c == '\r' || c == '\n') { // need to escape them and then quote the whole string - StringBuffer sb = new StringBuffer(len + 3); + StringBuilder sb = new StringBuilder(len + 3); sb.append('"'); sb.append(word.substring(0, i)); int lastc = 0; @@ -885,7 +885,7 @@ } if (needQuoting) { - StringBuffer sb = new StringBuffer(len + 2); + StringBuilder sb = new StringBuilder(len + 2); sb.append('"').append(word).append('"'); return sb.toString(); } else @@ -927,7 +927,7 @@ return s; // have to actually fold the string - StringBuffer sb = new StringBuffer(s.length() + 4); + StringBuilder sb = new StringBuilder(s.length() + 4); char lastc = 0; while (used + s.length() > 76) { int lastspace = -1; @@ -969,7 +969,7 @@ if (!foldText) return s; - StringBuffer sb = null; + StringBuilder sb = null; int i; while ((i = indexOfAny(s, "\r\n")) >= 0) { int start = i; @@ -986,7 +986,7 @@ while (i < l && ((c = s.charAt(i)) == ' ' || c == '\t')) i++; if (sb == null) - sb = new StringBuffer(s.length()); + sb = new StringBuilder(s.length()); if (start != 0) { sb.append(s.substring(0, start)); sb.append(' '); @@ -996,14 +996,14 @@ } // it's not a continuation line, just leave it in if (sb == null) - sb = new StringBuffer(s.length()); + sb = new StringBuilder(s.length()); sb.append(s.substring(0, i)); s = s.substring(i); } else { // there's a backslash at "start - 1" // strip it out, but leave in the line break if (sb == null) - sb = new StringBuffer(s.length()); + sb = new StringBuilder(s.length()); sb.append(s.substring(0, start - 1)); sb.append(s.substring(start, i)); s = s.substring(i); @@ -1051,7 +1051,7 @@ // no mapping table, or charset parameter is null return charset; - String alias = (String)mime2java.get(charset.toLowerCase()); + String alias = mime2java.get(charset.toLowerCase()); return alias == null ? charset : alias; } @@ -1073,7 +1073,7 @@ // no mapping table or charset param is null return charset; - String alias = (String)java2mime.get(charset.toLowerCase()); + String alias = java2mime.get(charset.toLowerCase()); return alias == null ? charset : alias; } @@ -1140,12 +1140,12 @@ // Tables to map MIME charset names to Java names and vice versa. // XXX - Should eventually use J2SE 1.4 java.nio.charset.Charset - private static Hashtable mime2java; - private static Hashtable java2mime; + private static Hashtable mime2java; + private static Hashtable java2mime; static { - java2mime = new Hashtable(40); - mime2java = new Hashtable(10); + java2mime = new Hashtable(40); + mime2java = new Hashtable(10); try { // Use this class's classloader to load the mapping file @@ -1229,7 +1229,7 @@ } } - private static void loadMappings(LineInputStream is, Hashtable table) { + private static void loadMappings(LineInputStream is, Hashtable table) { String currLine; while (true) { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java 2015-10-16 12:58:15.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java 2015-10-16 12:58:15.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -44,16 +44,16 @@ public final class ParameterList { - private final HashMap list; + private final HashMap list; /** * No-arg Constructor. */ public ParameterList() { - this.list = new HashMap(); + this.list = new HashMap(); } - private ParameterList(HashMap m) { + private ParameterList(HashMap m) { this.list = m; } @@ -73,7 +73,7 @@ int type; String name; - list = new HashMap(); + list = new HashMap(); while (true) { tk = h.next(); type = tk.getType(); @@ -130,7 +130,7 @@ * present. */ public String get(String name) { - return (String)list.get(name.trim().toLowerCase()); + return list.get(name.trim().toLowerCase()); } /** @@ -160,7 +160,7 @@ * * @return Enumeration of all parameter names in this list. */ - public Iterator getNames() { + public Iterator getNames() { return list.keySet().iterator(); } @@ -190,13 +190,13 @@ * @return String */ public String toString(int used) { - StringBuffer sb = new StringBuffer(); - Iterator itr = list.entrySet().iterator(); + StringBuilder sb = new StringBuilder(); + Iterator> itr = list.entrySet().iterator(); while (itr.hasNext()) { - Map.Entry e = (Map.Entry)itr.next(); - String name = (String)e.getKey(); - String value = quote((String)e.getValue()); + Map.Entry e = itr.next(); + String name = e.getKey(); + String value = quote(e.getValue()); sb.append("; "); used += 2; int len = name.length() + value.length() + 1; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java 2015-10-16 12:58:15.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java 2015-10-16 12:58:15.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -60,7 +60,7 @@ * and the current time (in milliseconds). */ public static String getUniqueBoundaryValue() { - StringBuffer s = new StringBuffer(); + StringBuilder s = new StringBuilder(); // Unique string is ----=_Part__. s.append("----=_Part_").append(part++).append("_"). --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java 2015-10-16 12:58:16.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java 2015-10-16 12:58:16.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -31,8 +31,6 @@ package com.sun.xml.internal.messaging.saaj.packaging.mime.util; -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; - import java.io.OutputStream; import java.io.IOException; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java 2015-10-16 12:58:17.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java 2015-10-16 12:58:17.000000000 +0200 @@ -70,9 +70,8 @@ } private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return AccessController.doPrivileged(new PrivilegedAction() { + public ClassLoader run() { ClassLoader cl = null; try { cl = Thread.currentThread().getContextClassLoader(); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java 2015-10-16 12:58:17.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java 2015-10-16 12:58:17.000000000 +0200 @@ -32,6 +32,7 @@ import com.sun.xml.internal.messaging.saaj.util.ParserPool; import com.sun.xml.internal.messaging.saaj.util.RejectDoctypeSaxFilter; import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer; + import org.xml.sax.InputSource; import org.xml.sax.XMLReader; @@ -46,6 +47,9 @@ import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stax.StAXSource; import javax.xml.transform.stream.StreamSource; + +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.logging.Logger; /** @@ -53,6 +57,8 @@ * underlying implementations. */ public class EnvelopeFactory { + private static final String SAX_PARSER_POOL_SIZE_PROP_NAME = "com.sun.xml.internal.messaging.saaj.soap.saxParserPoolSize"; + private static final int DEFAULT_SAX_PARSER_POOL_SIZE = 5; protected static final Logger log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, @@ -62,9 +68,22 @@ new ContextClassloaderLocal() { @Override protected ParserPool initialValue() throws Exception { - return new ParserPool(5); + Integer poolSize = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Integer run() { + try { + return Integer.getInteger( + SAX_PARSER_POOL_SIZE_PROP_NAME, + DEFAULT_SAX_PARSER_POOL_SIZE); + } catch (SecurityException se) { + return DEFAULT_SAX_PARSER_POOL_SIZE; + } + } + }); + return new ParserPool(poolSize); } - }; + }; public static Envelope createEnvelope(Source src, SOAPPartImpl soapPart) throws SOAPException @@ -132,51 +151,55 @@ } private static Envelope parseEnvelopeSax(Source src, SOAPPartImpl soapPart) throws SOAPException { - // Insert SAX filter to disallow Document Type Declarations since - // they are not legal in SOAP SAXParser saxParser = null; - if (src instanceof StreamSource) { - try { - saxParser = parserPool.get().get(); - } catch (Exception e) { - log.severe("SAAJ0601.util.newSAXParser.exception"); - throw new SOAPExceptionImpl( - "Couldn't get a SAX parser while constructing a envelope", - e); - } - InputSource is = SAXSource.sourceToInputSource(src); - if (is.getEncoding()== null && soapPart.getSourceCharsetEncoding() != null) { - is.setEncoding(soapPart.getSourceCharsetEncoding()); - } - XMLReader rejectFilter; - try { - rejectFilter = new RejectDoctypeSaxFilter(saxParser); - } catch (Exception ex) { - log.severe("SAAJ0510.soap.cannot.create.envelope"); - throw new SOAPExceptionImpl( - "Unable to create envelope from given source: ", - ex); - } - src = new SAXSource(rejectFilter, is); - } - try { - Transformer transformer = - EfficientStreamingTransformer.newTransformer(); - DOMResult result = new DOMResult(soapPart); - transformer.transform(src, result); + // Insert SAX filter to disallow Document Type Declarations since + // they are not legal in SOAP - Envelope env = (Envelope) soapPart.getEnvelope(); - return env; - } catch (Exception ex) { - if (ex instanceof SOAPVersionMismatchException) { - throw (SOAPVersionMismatchException) ex; - } - log.severe("SAAJ0511.soap.cannot.create.envelope"); - throw new SOAPExceptionImpl( - "Unable to create envelope from given source: ", - ex); + if (src instanceof StreamSource) { + try { + saxParser = parserPool.get().get(); + } catch (Exception e) { + log.severe("SAAJ0601.util.newSAXParser.exception"); + throw new SOAPExceptionImpl( + "Couldn't get a SAX parser while constructing a envelope", + e); + } + InputSource is = SAXSource.sourceToInputSource(src); + if (is.getEncoding()== null && soapPart.getSourceCharsetEncoding() != null) { + is.setEncoding(soapPart.getSourceCharsetEncoding()); + } + XMLReader rejectFilter; + try { + rejectFilter = new RejectDoctypeSaxFilter(saxParser); + } catch (Exception ex) { + log.severe("SAAJ0510.soap.cannot.create.envelope"); + throw new SOAPExceptionImpl( + "Unable to create envelope from given source: ", + ex); + } + src = new SAXSource(rejectFilter, is); + } + + try { + Transformer transformer = + EfficientStreamingTransformer.newTransformer(); + DOMResult result = new DOMResult(soapPart); + transformer.transform(src, result); + + Envelope env = (Envelope) soapPart.getEnvelope(); + return env; + } catch (Exception ex) { + if (ex instanceof SOAPVersionMismatchException) { + throw (SOAPVersionMismatchException) ex; + } + log.severe("SAAJ0511.soap.cannot.create.envelope"); + throw new SOAPExceptionImpl( + "Unable to create envelope from given source: ", + ex); + } } finally { + //no matter what condition occurs, always return the parser to the pool if (saxParser != null) { parserPool.get().returnParser(saxParser); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java 2015-10-16 12:58:18.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java 2015-10-16 12:58:18.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -131,9 +131,9 @@ + obj.getClass().toString()); } ImageWriter writer = null; - Iterator i = ImageIO.getImageWritersByMIMEType(type); + Iterator i = ImageIO.getImageWritersByMIMEType(type); if (i.hasNext()) { - writer = (ImageWriter)i.next(); + writer = i.next(); } if (writer != null) { ImageOutputStream stream = null; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java 2015-10-16 12:58:19.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java 2015-10-16 12:58:19.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -83,7 +83,7 @@ protected MimeHeaders headers; protected ContentType contentType; protected SOAPPartImpl soapPartImpl; - protected FinalArrayList attachments; + protected FinalArrayList attachments; protected boolean saved = false; protected byte[] messageBytes; protected int messageByteCount; @@ -855,7 +855,7 @@ throw new RuntimeException(e); } if (attachments == null) - attachments = new FinalArrayList(); + attachments = new FinalArrayList(); attachments.add(attachment); @@ -887,15 +887,15 @@ headers.setHeader("Content-Type", ct.toString()); } - private class MimeMatchingIterator implements Iterator { + private class MimeMatchingIterator implements Iterator { public MimeMatchingIterator(MimeHeaders headers) { this.headers = headers; this.iter = attachments.iterator(); } - private Iterator iter; + private Iterator iter; private MimeHeaders headers; - private Object nextAttachment; + private AttachmentPart nextAttachment; public boolean hasNext() { if (nextAttachment == null) @@ -903,9 +903,9 @@ return nextAttachment != null; } - public Object next() { + public AttachmentPart next() { if (nextAttachment != null) { - Object ret = nextAttachment; + AttachmentPart ret = nextAttachment; nextAttachment = null; return ret; } @@ -916,7 +916,7 @@ return null; } - Object nextMatch() { + AttachmentPart nextMatch() { while (iter.hasNext()) { AttachmentPartImpl ap = (AttachmentPartImpl) iter.next(); if (ap.hasAllHeaders(headers)) @@ -951,12 +951,12 @@ if (attachments == null) return ; - Iterator it = new MimeMatchingIterator(headers); + Iterator it = new MimeMatchingIterator(headers); while (it.hasNext()) { int index = attachments.indexOf(it.next()); attachments.set(index, null); } - FinalArrayList f = new FinalArrayList(); + FinalArrayList f = new FinalArrayList(); for (int i = 0; i < attachments.size(); i++) { if (attachments.get(i) != null) { f.add(attachments.get(i)); @@ -1066,7 +1066,7 @@ } private String convertToSingleLine(String contentType) { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); for (int i = 0; i < contentType.length(); i ++) { char c = contentType.charAt(i); if (c != '\r' && c != '\n' && c != '\t') @@ -1098,7 +1098,7 @@ headerAndBody = new BMMimeMultipart(); headerAndBody.addBodyPart(mimeSoapPart); if (attachments != null) { - for (Iterator eachAttachment = attachments.iterator(); + for (Iterator eachAttachment = attachments.iterator(); eachAttachment.hasNext();) { headerAndBody.addBodyPart( ((AttachmentPartImpl) eachAttachment.next()) @@ -1424,7 +1424,7 @@ } if (attachments == null) - attachments = new FinalArrayList(); + attachments = new FinalArrayList(); int count = multiPart.getCount(); for (int i=0; i < count; i++ ) { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java 2015-10-16 12:58:20.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java 2015-10-16 12:58:19.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -32,7 +32,6 @@ import javax.xml.soap.*; import com.sun.xml.internal.messaging.saaj.soap.impl.ElementFactory; -import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.*; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java 2015-10-16 12:58:20.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java 2015-10-16 12:58:20.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 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 @@ -27,6 +27,7 @@ import javax.xml.namespace.QName; import javax.xml.soap.SOAPException; +import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; @@ -76,7 +77,7 @@ public String getPayloadAttributeValue(String attName) { if (lazySource.isPayloadStreamReader()) { XMLStreamReader reader = lazySource.readPayload(); - if (reader.getEventType() == reader.START_ELEMENT) { + if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) { return reader.getAttributeValue(null, attName); } } @@ -87,7 +88,7 @@ public String getPayloadAttributeValue(QName attName) { if (lazySource.isPayloadStreamReader()) { XMLStreamReader reader = lazySource.readPayload(); - if (reader.getEventType() == reader.START_ELEMENT) { + if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) { return reader.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart()); } } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java 2015-10-16 12:58:21.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java 2015-10-16 12:58:21.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 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 @@ -27,6 +27,7 @@ import javax.xml.namespace.QName; import javax.xml.soap.SOAPException; +import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamReader; import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter; @@ -65,14 +66,14 @@ } public QName getPayloadQName() { - return (in.getEventType() == in.START_ELEMENT) ? in.getName() : null; + return (in.getEventType() == XMLStreamConstants.START_ELEMENT) ? in.getName() : null; } public String getPayloadAttributeValue(String attName) { - return (in.getEventType() == in.START_ELEMENT) ? in.getAttributeValue(null, attName) : null; + return (in.getEventType() == XMLStreamConstants.START_ELEMENT) ? in.getAttributeValue(null, attName) : null; } public String getPayloadAttributeValue(QName attName) { - return (in.getEventType() == in.START_ELEMENT) ? in.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart()) : null; + return (in.getEventType() == XMLStreamConstants.START_ELEMENT) ? in.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart()) : null; } } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java 2015-10-16 12:58:22.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java 2015-10-16 12:58:21.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -30,7 +30,6 @@ import javax.activation.*; import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility; import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType; /** --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java 2015-10-16 12:58:22.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java 2015-10-16 12:58:22.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -44,7 +44,7 @@ */ public class XmlDataContentHandler implements DataContentHandler { public static final String STR_SRC = "javax.xml.transform.stream.StreamSource"; - private static Class streamSourceClass = null; + private static Class streamSourceClass = null; public XmlDataContentHandler() throws ClassNotFoundException { if (streamSourceClass == null) { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java 2015-10-16 12:58:23.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java 2015-10-16 12:58:23.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -29,12 +29,9 @@ */ package com.sun.xml.internal.messaging.saaj.soap.dynamic; -import java.io.IOException; -import java.io.InputStream; import javax.xml.soap.*; -import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl; public class SOAPMessageFactoryDynamicImpl extends MessageFactoryImpl { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java 2015-10-16 12:58:23.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java 2015-10-16 12:58:23.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -131,7 +131,7 @@ } protected SOAPElement findFault() { - Iterator eachChild = getChildElementNodes(); + Iterator eachChild = getChildElementNodes(); while (eachChild.hasNext()) { SOAPElement child = (SOAPElement) eachChild.next(); if (isFault(child)) { @@ -247,7 +247,7 @@ org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true); // Adding replacingNode at the last of the children list of body addNode(replacingNode); - Iterator i = + Iterator i = getChildElements(NameImpl.copyElementName(rootElement)); // Return the child element with the required name which is at the // end of the list @@ -284,7 +284,7 @@ public Document extractContentAsDocument() throws SOAPException { - Iterator eachChild = getChildElements(); + Iterator eachChild = getChildElements(); javax.xml.soap.Node firstBodyElement = null; while (eachChild.hasNext() && @@ -314,8 +314,7 @@ Document document = null; try { - DocumentBuilderFactory factory = - new com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl(); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java 2015-10-16 12:58:24.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java 2015-10-16 12:58:24.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -77,8 +77,8 @@ } public Iterator getDetailEntries() { - return new Iterator() { - Iterator eachNode = getChildElementNodes(); + return new Iterator() { + Iterator eachNode = getChildElementNodes(); SOAPElement next = null; SOAPElement last = null; @@ -95,7 +95,7 @@ return next != null; } - public Object next() { + public SOAPElement next() { if (!hasNext()) { throw new NoSuchElementException(); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java 2015-10-16 12:58:25.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java 2015-10-16 12:58:25.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -162,8 +162,8 @@ !(currentAncestor instanceof Document)) { if (currentAncestor instanceof ElementImpl) { - QName name = ((ElementImpl) currentAncestor).getElementQName(); /* + QName name = ((ElementImpl) currentAncestor).getElementQName(); if (prefix.equals(name.getPrefix())) { String uri = name.getNamespaceURI(); if ("".equals(uri)) { @@ -339,7 +339,7 @@ log.severe("SAAJ0158.impl.version.mismatch.fault"); throw new SOAPExceptionImpl("SOAP Version mismatch encountered when trying to add SOAPFault to SOAPBody"); } - Iterator it = this.getChildElements(); + Iterator it = this.getChildElements(); if (it.hasNext()) { log.severe("SAAJ0156.impl.adding.fault.error"); throw new SOAPExceptionImpl("Cannot add SOAPFault as a child of a non-Empty SOAPBody"); @@ -450,7 +450,7 @@ } protected SOAPElement findAndConvertChildElement(NameImpl name) { - Iterator eachChild = getChildElementNodes(); + Iterator eachChild = getChildElementNodes(); while (eachChild.hasNext()) { SOAPElement child = (SOAPElement) eachChild.next(); if (child.getElementName().equals(name)) { @@ -560,10 +560,10 @@ } public Iterator getAllAttributes() { - Iterator i = getAllAttributesFrom(this); - ArrayList list = new ArrayList(); + Iterator i = getAllAttributesFrom(this); + ArrayList list = new ArrayList(); while (i.hasNext()) { - Name name = (Name) i.next(); + Name name = i.next(); if (!"xmlns".equalsIgnoreCase(name.getPrefix())) list.add(name); } @@ -571,10 +571,10 @@ } public Iterator getAllAttributesAsQNames() { - Iterator i = getAllAttributesFrom(this); - ArrayList list = new ArrayList(); + Iterator i = getAllAttributesFrom(this); + ArrayList list = new ArrayList(); while (i.hasNext()) { - Name name = (Name) i.next(); + Name name = i.next(); if (!"xmlns".equalsIgnoreCase(name.getPrefix())) { list.add(NameImpl.convertToQName(name)); } @@ -591,8 +591,8 @@ return doGetNamespacePrefixes(true); } - protected Iterator doGetNamespacePrefixes(final boolean deep) { - return new Iterator() { + protected Iterator doGetNamespacePrefixes(final boolean deep) { + return new Iterator() { String next = null; String last = null; NamespaceContextIterator eachNamespace = @@ -613,7 +613,7 @@ return next != null; } - public Object next() { + public String next() { findNext(); if (next == null) { throw new NoSuchElementException(); @@ -676,7 +676,7 @@ return true; } - public Iterator getChildElements() { + public Iterator getChildElements() { return getChildElementsFrom(this); } @@ -694,15 +694,15 @@ Element element, ElementImpl copy) { - Iterator eachAttribute = getAllAttributesFrom(element); + Iterator eachAttribute = getAllAttributesFrom(element); while (eachAttribute.hasNext()) { - Name name = (Name) eachAttribute.next(); + Name name = eachAttribute.next(); copy.addAttributeBare(name, getAttributeValueFrom(element, name)); } - Iterator eachChild = getChildElementsFrom(element); + Iterator eachChild = getChildElementsFrom(element); while (eachChild.hasNext()) { - Node nextChild = (Node) eachChild.next(); + Node nextChild = eachChild.next(); copy.insertBefore(nextChild, null); } @@ -714,16 +714,16 @@ return copy; } - protected Iterator getChildElementNodes() { - return new Iterator() { - Iterator eachNode = getChildElements(); + protected Iterator getChildElementNodes() { + return new Iterator() { + Iterator eachNode = getChildElements(); Node next = null; Node last = null; public boolean hasNext() { if (next == null) { while (eachNode.hasNext()) { - Node node = (Node) eachNode.next(); + Node node = eachNode.next(); if (node instanceof SOAPElement) { next = node; break; @@ -733,7 +733,7 @@ return next != null; } - public Object next() { + public Node next() { if (hasNext()) { last = next; next = null; @@ -761,16 +761,16 @@ return getChildElements(qname.getNamespaceURI(), qname.getLocalPart()); } - private Iterator getChildElements(final String nameUri, final String nameLocal) { - return new Iterator() { - Iterator eachElement = getChildElementNodes(); + private Iterator getChildElements(final String nameUri, final String nameLocal) { + return new Iterator() { + Iterator eachElement = getChildElementNodes(); Node next = null; Node last = null; public boolean hasNext() { if (next == null) { while (eachElement.hasNext()) { - Node element = (Node) eachElement.next(); + Node element = eachElement.next(); String elementUri = element.getNamespaceURI(); elementUri = elementUri == null ? "" : elementUri; String elementName = element.getLocalName(); @@ -784,7 +784,7 @@ return next != null; } - public Object next() { + public Node next() { if (!hasNext()) { throw new NoSuchElementException(); } @@ -894,7 +894,7 @@ } protected javax.xml.soap.Node getValueNode() { - Iterator i = getChildElements(); + Iterator i = getChildElements(); while (i.hasNext()) { javax.xml.soap.Node n = (javax.xml.soap.Node) i.next(); if (n.getNodeType() == org.w3c.dom.Node.TEXT_NODE || @@ -1054,10 +1054,10 @@ return null; } - protected static Iterator getAllAttributesFrom(final Element element) { + protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); - return new Iterator() { + return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; @@ -1066,7 +1066,7 @@ return attributeIndex < attributesLength; } - public Object next() { + public Name next() { if (!hasNext()) { throw new NoSuchElementException(); } @@ -1133,8 +1133,8 @@ return attribute == null ? null : attribute.getValue(); } - protected static Iterator getChildElementsFrom(final Element element) { - return new Iterator() { + protected static Iterator getChildElementsFrom(final Element element) { + return new Iterator() { Node next = element.getFirstChild(); Node nextNext = null; Node last = null; @@ -1150,7 +1150,7 @@ return next != null; } - public Object next() { + public Node next() { if (hasNext()) { last = next; next = null; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java 2015-10-16 12:58:26.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java 2015-10-16 12:58:26.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -248,10 +248,6 @@ this.xmlDecl = value; } - private String getOmitXmlDecl() { - return this.omitXmlDecl; - } - public void setCharsetEncoding(String value) { charset = value; } @@ -309,7 +305,6 @@ else { try { // Run transform and generate FI output from content - Source source = getContent(); Transformer transformer = EfficientStreamingTransformer.newTransformer(); transformer.transform(getContent(), FastInfosetReflection.FastInfosetResult_new(out)); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java 2015-10-16 12:58:26.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java 2015-10-16 12:58:26.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -32,7 +32,6 @@ import javax.xml.soap.*; import org.w3c.dom.Element; -import org.w3c.dom.Node; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; @@ -116,7 +115,7 @@ return getHeaderElementsForActor(actor, true, false); } - protected Iterator getHeaderElementsForActor( + protected Iterator getHeaderElementsForActor( String actor, boolean detach, boolean mustUnderstand) { @@ -127,15 +126,15 @@ return getHeaderElements(actor, detach, mustUnderstand); } - protected Iterator getHeaderElements( + protected Iterator getHeaderElements( String actor, boolean detach, boolean mustUnderstand) { - List elementList = new ArrayList(); + List elementList = new ArrayList(); - Iterator eachChild = getChildElements(); + Iterator eachChild = getChildElements(); - Object currentChild = iterate(eachChild); + org.w3c.dom.Node currentChild = iterate(eachChild); while (currentChild != null) { if (!(currentChild instanceof SOAPHeaderElement)) { currentChild = iterate(eachChild); @@ -173,7 +172,7 @@ return elementList.listIterator(); } - private Object iterate(Iterator each) { + private T iterate(Iterator each) { return each.hasNext() ? each.next() : null; } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java 2015-10-16 12:58:27.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java 2015-10-16 12:58:27.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -36,11 +36,9 @@ import javax.xml.namespace.QName; import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPFaultElement; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPConstants; import javax.xml.soap.Name; -import javax.xml.soap.Name; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java 2015-10-16 12:58:28.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java 2015-10-16 12:58:28.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -29,8 +29,6 @@ */ package com.sun.xml.internal.messaging.saaj.soap.ver1_1; -import java.util.List; -import java.util.Iterator; import java.util.logging.Level; import java.util.logging.Logger; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java 2015-10-16 12:58:28.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java 2015-10-16 12:58:28.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -29,7 +29,6 @@ */ package com.sun.xml.internal.messaging.saaj.soap.ver1_1; -import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.soap.SOAPConstants; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java 2015-10-16 12:58:29.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java 2015-10-16 12:58:29.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -30,7 +30,6 @@ package com.sun.xml.internal.messaging.saaj.soap.ver1_2; import java.util.logging.Logger; -import java.util.Locale; import javax.xml.namespace.QName; import javax.xml.soap.*; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java 2015-10-16 12:58:30.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java 2015-10-16 12:58:30.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, 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 @@ -146,7 +146,7 @@ findReasonElement(); Iterator eachTextElement = this.faultStringElement.getChildElements(textName); - List texts = new ArrayList(); + List texts = new ArrayList(); while (eachTextElement.hasNext()) { SOAPElement textElement = (SOAPElement) eachTextElement.next(); Locale thisLocale = getLocale(textElement); @@ -235,7 +235,7 @@ findReasonElement(); Iterator eachTextElement = this.faultStringElement.getChildElements(textName); - List localeSet = new ArrayList(); + List localeSet = new ArrayList(); while (eachTextElement.hasNext()) { SOAPElement textElement = (SOAPElement) eachTextElement.next(); Locale thisLocale = getLocale(textElement); @@ -435,7 +435,7 @@ public Iterator getFaultSubcodes() { if (this.faultCodeElement == null) findFaultCodeElement(); - final List subcodeList = new ArrayList(); + final List subcodeList = new ArrayList(); SOAPElement currentCodeElement = this.faultCodeElement; Iterator subcodeElements = currentCodeElement.getChildElements(subcodeName); @@ -449,14 +449,14 @@ subcodeElements = currentCodeElement.getChildElements(subcodeName); } //return subcodeList.iterator(); - return new Iterator() { - Iterator subCodeIter = subcodeList.iterator(); + return new Iterator() { + Iterator subCodeIter = subcodeList.iterator(); public boolean hasNext() { return subCodeIter.hasNext(); } - public Object next() { + public QName next() { return subCodeIter.next(); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java 2015-10-16 12:58:30.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java 2015-10-16 12:58:30.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -29,8 +29,6 @@ */ package com.sun.xml.internal.messaging.saaj.soap.ver1_2; -import java.util.List; -import java.util.Iterator; import java.util.logging.Logger; import java.util.logging.Level; @@ -40,7 +38,6 @@ import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; -import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java 2015-10-16 12:58:31.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java 2015-10-16 12:58:31.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -29,8 +29,6 @@ */ package com.sun.xml.internal.messaging.saaj.soap.ver1_2; -import java.util.logging.Logger; - import javax.xml.namespace.QName; import javax.xml.soap.Name; import javax.xml.soap.SOAPElement; @@ -42,10 +40,6 @@ public class HeaderElement1_2Impl extends HeaderElementImpl { - private static final Logger log = - Logger.getLogger(HeaderElement1_2Impl.class.getName(), - "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings"); - public HeaderElement1_2Impl(SOAPDocumentImpl ownerDoc, Name qname) { super(ownerDoc, qname); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java 2015-10-16 12:58:32.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java 2015-10-16 12:58:32.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -29,7 +29,6 @@ */ package com.sun.xml.internal.messaging.saaj.soap.ver1_2; -import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.soap.SOAPConstants; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java 2015-10-16 12:58:32.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java 2015-10-16 12:58:32.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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,7 +47,6 @@ static private final int TWENTYFOURBITGROUP = 24; static private final int EIGHTBIT = 8; static private final int SIXTEENBIT = 16; - static private final int SIXBIT = 6; static private final int FOURBYTE = 4; @@ -244,7 +243,7 @@ public static String base64Decode( String orig ) { char chars[]=orig.toCharArray(); - StringBuffer sb=new StringBuffer(); + StringBuilder sb=new StringBuilder(); int i=0; int shift = 0; // # of excess bits stored in accum --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java 2015-10-16 12:58:33.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java 2015-10-16 12:58:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -44,7 +44,7 @@ /** * FI DOMDocumentParser constructor using reflection. */ - static Constructor fiDOMDocumentParser_new; + static Constructor fiDOMDocumentParser_new; /** * FI DOMDocumentParser.parse() method via reflection. @@ -54,7 +54,7 @@ /** * FI DOMDocumentSerializer constructor using reflection. */ - static Constructor fiDOMDocumentSerializer_new; + static Constructor fiDOMDocumentSerializer_new; /** * FI FastInfosetSource.serialize(Document) method via reflection. @@ -69,12 +69,12 @@ /** * FI FastInfosetSource constructor using reflection. */ - static Class fiFastInfosetSource_class; + static Class fiFastInfosetSource_class; /** * FI FastInfosetSource constructor using reflection. */ - static Constructor fiFastInfosetSource_new; + static Constructor fiFastInfosetSource_new; /** * FI FastInfosetSource.getInputStream() method via reflection. @@ -89,7 +89,7 @@ /** * FI FastInfosetResult constructor using reflection. */ - static Constructor fiFastInfosetResult_new; + static Constructor fiFastInfosetResult_new; /** * FI FastInfosetResult.getOutputSTream() method via reflection. @@ -98,7 +98,7 @@ static { try { - Class clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentParser"); + Class clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentParser"); fiDOMDocumentParser_new = clazz.getConstructor((Class[]) null); fiDOMDocumentParser_parse = clazz.getMethod("parse", new Class[] { org.w3c.dom.Document.class, java.io.InputStream.class }); @@ -179,7 +179,7 @@ "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource"); } - public static Class getFastInfosetSource_class() { + public static Class getFastInfosetSource_class() { if (fiFastInfosetSource_class == null) { throw new RuntimeException("Unable to locate Fast Infoset implementation"); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java 2015-10-16 12:58:34.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java 2015-10-16 12:58:34.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -32,7 +32,7 @@ * {@link ArrayList} with a final marker to help JIT. * @author Kohsuke Kawaguchi */ -public final class FinalArrayList extends ArrayList { +public final class FinalArrayList extends ArrayList { public FinalArrayList(int initialCapacity) { super(initialCapacity); } @@ -40,7 +40,7 @@ public FinalArrayList() { } - public FinalArrayList(Collection collection) { + public FinalArrayList(Collection collection) { super(collection); } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java 2015-10-16 12:58:34.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java 2015-10-16 12:58:34.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -65,14 +65,14 @@ this.reader = rdr; return; } - CharWriter cout = new CharWriter(); + CharArrayWriter cout = new CharArrayWriter(); char[] temp = new char[1024]; int len; while (-1 != (len = rdr.read(temp))) cout.write(temp, 0, len); - this.reader = new CharReader(cout.getChars(), cout.getCount()); + this.reader = new CharArrayReader(cout.toCharArray(), 0, cout.size()); } public InputStream getInputStream() { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java 2015-10-16 12:58:35.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java 2015-10-16 12:58:35.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -129,8 +129,6 @@ /** If specified, stores the fragment for this URI; otherwise null */ private String m_fragment = null; - private static boolean DEBUG = false; - /** * Construct a new and uninitialized URI. */ @@ -725,7 +723,7 @@ * @return the scheme-specific part for this URI */ public String getSchemeSpecificPart() { - StringBuffer schemespec = new StringBuffer(); + StringBuilder schemespec = new StringBuilder(); if (m_userinfo != null || m_host != null || m_port != -1) { schemespec.append("//"); @@ -805,7 +803,7 @@ */ public String getPath(boolean p_includeQueryString, boolean p_includeFragment) { - StringBuffer pathString = new StringBuffer(m_path); + StringBuilder pathString = new StringBuilder(m_path); if (p_includeQueryString && m_queryString != null) { pathString.append('?'); @@ -1148,7 +1146,7 @@ * @return the URI string specification */ public String toString() { - StringBuffer uriSpecString = new StringBuffer(); + StringBuilder uriSpecString = new StringBuilder(); if (m_scheme != null) { uriSpecString.append(m_scheme); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java 2015-10-16 12:58:36.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java 2015-10-16 12:58:36.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -42,7 +42,7 @@ * represent. */ public static String decode(String s) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int i=0; while (i') { @@ -104,7 +102,7 @@ // no XML decl if (!utf16 && !utf8) { - m_pushbackReader.unread(aChar, 0, len); + m_pushbackReader.unread(decl.toCharArray(), 0, len); return; } m_hasHeader = true; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java 2015-10-16 12:58:37.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java 2015-10-16 12:58:37.000000000 +0200 @@ -315,12 +315,12 @@ return currentElement.lookupPrefix(namespaceURI); } public Iterator getPrefixes(final String namespaceURI) { - return new Iterator() { + return new Iterator() { String prefix = getPrefix(namespaceURI); public boolean hasNext() { return (prefix != null); } - public Object next() { + public String next() { if (!hasNext()) throw new java.util.NoSuchElementException(); String next = prefix; prefix = null; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java 2015-10-16 12:58:38.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java 2015-10-16 12:58:38.000000000 +0200 @@ -115,12 +115,12 @@ return currentElement.lookupPrefix(namespaceURI); } public Iterator getPrefixes(final String namespaceURI) { - return new Iterator() { + return new Iterator() { String prefix = getPrefix(namespaceURI); public boolean hasNext() { return (prefix != null); } - public Object next() { + public String next() { if (prefix == null) throw new java.util.NoSuchElementException(); String next = prefix; prefix = null; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/BindingIDFactory.java 2015-10-16 12:58:38.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/BindingIDFactory.java 2015-10-16 12:58:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, 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 @@ -81,7 +81,7 @@ * if the implementation understood the transport but it is not correct, * this exception can be thrown to abort the creation with error. * No further {@link BindingIDFactory} will be consulted, and - * {@link BindingID#create(String, SOAPVersion)} will throw the exception. + * {@link #create(String, SOAPVersion)} will throw the exception. */ public @Nullable BindingID create(@NotNull String transport, @NotNull SOAPVersion soapVersion) throws WebServiceException { return null; --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java 2015-10-16 12:58:39.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java 2015-10-16 12:58:39.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -95,6 +95,7 @@ public com.oracle.webservices.internal.api.message.MessageContext createContext(SOAPMessage soap) { throwIfIllegalMessageArgument(soap); + if (saajFactory!= null) return packet(saajFactory.createMessage(soap)); return packet(Messages.create(soap)); } @@ -162,6 +163,7 @@ if (mf != null) { p.setMtomFeature(mf); } + p.setSAAJFactory(saajFactory); return p; } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/Packet.java 2015-10-16 12:58:40.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/Packet.java 2015-10-16 12:58:40.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -1514,4 +1514,12 @@ public void setFastInfosetDisabled(boolean b) { isFastInfosetDisabled = b; } + + private com.sun.xml.internal.ws.api.message.saaj.SAAJFactory saajFactory; + public com.sun.xml.internal.ws.api.message.saaj.SAAJFactory getSAAJFactory() { + return saajFactory; + } + public void setSAAJFactory(com.sun.xml.internal.ws.api.message.saaj.SAAJFactory saajFactory) { + this.saajFactory = saajFactory; + } } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java 2015-10-16 12:58:41.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java 2015-10-16 12:58:40.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -157,6 +157,11 @@ * @throws SOAPException if SAAJ processing fails */ public static SOAPMessage read(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException { + SAAJFactory saajfac = packet.getSAAJFactory(); + if (saajfac != null) { + SOAPMessage msg = saajfac.readAsSOAPMessage(soapVersion, message, packet); + if (msg != null) return msg; + } for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) { SOAPMessage msg = s.readAsSOAPMessage(soapVersion, message, packet); if (msg != null) @@ -173,6 +178,11 @@ * @throws SOAPException if SAAJ processing fails */ public static SAAJMessage read(Packet packet) throws SOAPException { + SAAJFactory saajfac = packet.getSAAJFactory(); + if (saajfac != null) { + SAAJMessage msg = saajfac.readAsSAAJ(packet); + if (msg != null) return msg; + } // Use the Component from the Packet if it exists. Note the logic // in the ServiceFinder is such that find(Class) is not equivalent // to find (Class, null), so the ternary operator is needed. --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java 2015-10-16 12:58:41.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java 2015-10-16 12:58:41.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -46,7 +46,6 @@ * opaque method invocation {@link Work#execute}, allowing the use of * {@code finally} block. * - * * @author Kohsuke Kawaguchi */ public interface FiberContextSwitchInterceptor { --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java 2015-10-16 12:58:42.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java 2015-10-16 12:58:42.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -194,10 +194,11 @@ * of this class needs to be aware of that. */ public static void recycle(XMLStreamReader r) { + /* the XMLStreamReaderFactory recycle becomes expenisve in the threadLocal get operation. get().doRecycle(r); if (r instanceof RecycleAware) { ((RecycleAware)r).onRecycled(); - } + }*/ } // implementations --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/db/DatabindingImpl.java 2015-10-16 12:58:43.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/db/DatabindingImpl.java 2015-10-16 12:58:43.000000000 +0200 @@ -84,7 +84,9 @@ modeler.setClassLoader(config.getClassLoader()); seiModel = modeler.buildRuntimeModel(); WSDLPort wsdlport = config.getWsdlPort(); - packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures()); + Object facProp = config.properties().get("com.sun.xml.internal.ws.api.message.MessageContextFactory"); + packetFactory = (facProp != null && facProp instanceof MessageContextFactory)? (MessageContextFactory)facProp : + new MessageContextFactory(seiModel.getWSBinding().getFeatures()); clientConfig = isClientConfig(config); if (clientConfig) { initStubHandlers(); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java 2015-10-16 12:58:43.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java 2015-10-16 12:58:43.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -221,9 +221,9 @@ } private static void fail(final Class service, final String msg, final Throwable cause) - throws ServiceConfigurationError { + throws ServiceConfigurationError { final ServiceConfigurationError sce - = new ServiceConfigurationError(LocalizationMessages.WSP_0025_SPI_FAIL_SERVICE_MSG(service.getName(), msg)); + = new ServiceConfigurationError(LocalizationMessages.WSP_0025_SPI_FAIL_SERVICE_MSG(service.getName(), msg)); if (null != cause) { sce.initCause(cause); } @@ -237,7 +237,7 @@ }*/ private static void fail(final Class service, final URL u, final int line, final String msg, final Throwable cause) - throws ServiceConfigurationError { + throws ServiceConfigurationError { fail(service, LocalizationMessages.WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(u , line, msg), cause); } @@ -248,7 +248,7 @@ */ private static int parseLine(final Class service, final URL u, final BufferedReader r, final int lc, final List names, final Set returned) - throws IOException, ServiceConfigurationError { + throws IOException, ServiceConfigurationError { String ln = r.readLine(); if (ln == null) { return -1; @@ -293,7 +293,7 @@ */ @SuppressWarnings({"StatementWithEmptyBody"}) private static Iterator parse(Class service, URL u, Set returned) - throws ServiceConfigurationError { + throws ServiceConfigurationError { InputStream in = null; BufferedReader r = null; ArrayList names = new ArrayList(); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java 2015-10-16 12:58:44.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java 2015-10-16 12:58:44.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -25,6 +25,7 @@ package com.sun.xml.internal.ws.spi.db; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.logging.Level; @@ -156,17 +157,9 @@ + " based on '" + JAXB_CONTEXT_FACTORY_PROPERTY + "' System property"); } else { - // Find a default provider. Note we always ensure the list - // is always non-empty. - for (BindingContextFactory factory : factories()) { - if (LOGGER.isLoggable(Level.FINE)) - LOGGER.log(Level.FINE, - "Using SPI-determined databindng mode: " - + factory.getClass().getName()); - // Special case: no name lookup used. - return factory.newContext(bi); - } - + // Find a default provider. Note we always ensure the list is always non-empty. + BindingContext factory = getBindingContextFromSpi(factories(), bi); + if (factory != null) return factory; // Should never get here as the list is non-empty. LOGGER.log(Level.SEVERE, "No Binding Context Factories found."); throw new DatabindingException("No Binding Context Factories found."); @@ -178,7 +171,63 @@ throw new DatabindingException("Unknown Databinding mode: " + mode); } - static public boolean isContextSupported(Object o) { + /** + * Creates JAXB bindingContext with one of the provided factories. + * To filter appropriate factory {@link BindingContextFactory#isFor(String)} method is used. + * Currently known 2 appropriate factories: JAXB RI and MOXY. + * In case no suitable factory is found we are trying to create context with any given factory. + * + * @param factories given collection of factories. + * @param bindingInfo will be used to create bindingContext. + * @return Created context or null. Null will be returned if we were not able to create context with any given factory. + */ + private static BindingContext getBindingContextFromSpi(List factories, BindingInfo bindingInfo) { + List fallback = new ArrayList(); + BindingContext result; + for (BindingContextFactory factory : factories) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Found SPI-determined databindng mode: " + factory.getClass().getName()); + } + if (factory.isFor("org.eclipse.persistence.jaxb") || factory.isFor("com.sun.xml.internal.bind.v2.runtime")) { // filter (JAXB RI || MOXy) implementation + result = factory.newContext(bindingInfo); + if (result != null) { + return result; + } + } else { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Skipped -> not JAXB."); + } + fallback.add(factory); + } + } + for (BindingContextFactory factory : fallback) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Fallback. Creating from: " + factory.getClass().getName()); + } + result = getContextOrNullIfError(factory, bindingInfo); + if (result != null) { + return result; + } + } + return null; + } + + /** + * Factory creates new context bases on provided bindingInfo. + * @param factory given factory. + * @param bindingInfo to be used to create context. + * @return Created context or null. Null will be returned if an error happened during the creation process. + */ + private static BindingContext getContextOrNullIfError(BindingContextFactory factory, BindingInfo bindingInfo) { + try { + return factory.newContext(bindingInfo); + } catch (Exception e) { + LOGGER.log(Level.WARNING, e.getMessage(), e); + return null; + } + } + + static public boolean isContextSupported(Object o) { if (o == null) return false; String pkgName = o.getClass().getPackage().getName(); for (BindingContextFactory f: factories()) if (f.isFor(pkgName)) return true; @@ -199,50 +248,4 @@ static public BindingContext getBindingContext(Marshaller m) { return getJAXBFactory(m).getContext(m); } - - /** - * Creates a new {@link BindingContext}. - * - *

    - * {@link JAXBContext#newInstance(Class[]) JAXBContext.newInstance()} methods may - * return other JAXB providers that are not compatible with the JAX-RPC RI. - * This method guarantees that the JAX-WS RI will finds the JAXB RI. - * - * @param classes - * Classes to be bound. See {@link JAXBContext#newInstance(Class[])} for the meaning. - * @param typeRefs - * See {@link #TYPE_REFERENCES} for the meaning of this parameter. - * Can be null. - * @param subclassReplacements - * See {@link #SUBCLASS_REPLACEMENTS} for the meaning of this parameter. - * Can be null. - * @param defaultNamespaceRemap - * See {@link #DEFAULT_NAMESPACE_REMAP} for the meaning of this parameter. - * Can be null (and should be null for ordinary use of JAXB.) - * @param c14nSupport - * See {@link #CANONICALIZATION_SUPPORT} for the meaning of this parameter. - * @param ar - * See {@link #ANNOTATION_READER} for the meaning of this parameter. - * Can be null. - * @since JAXB 2.1 EA2 - */ -// public static BindingContext newInstance(@NotNull Class[] classes, -// @Nullable Collection typeRefs, -// @Nullable Map subclassReplacements, -// @Nullable String defaultNamespaceRemap, boolean c14nSupport, -// @Nullable RuntimeAnnotationReader ar) throws JAXBException { -// return ContextFactory.createContext(classes, typeRefs, subclassReplacements, -// defaultNamespaceRemap, c14nSupport, ar, false, false, false); -// } -// -// /** -// * @deprecated -// * Compatibility with older versions. -// */ -// public static BindingContext newInstance(@NotNull Class[] classes, -// @Nullable Collection typeRefs, -// @Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException { -// return newInstance(classes,typeRefs, Collections.emptyMap(), -// defaultNamespaceRemap,c14nSupport,null); -// } } --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java 2015-10-16 12:58:45.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java 2015-10-16 12:58:45.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -521,7 +521,7 @@ String systemId = e.getValue(); String ns = e.getKey(); sb.append("\n"); --- old/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties 2015-10-16 12:58:45.000000000 +0200 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties 2015-10-16 12:58:45.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 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 @@ -23,7 +23,7 @@ # questions. # -build-id=2.2.11-b150402.1412 -build-version=JAX-WS RI 2.2.11-b150402.1412 -major-version=2.2.11 -svn-revision=f923291dedcf386c5f408263984a99d7cedf0012 +build-id=2.3.0-SNAPSHOT +build-version=JAX-WS RI 2.3.0-SNAPSHOT +major-version=2.3.0 +svn-revision=ffaa49e66cc05e1bb2ddc103076a340dad5df997 --- old/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java 2015-10-16 12:58:46.000000000 +0200 +++ new/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java 2015-10-16 12:58:46.000000000 +0200 @@ -141,7 +141,7 @@ * @param cause the {@code Throwable} object that caused this * {@code SOAPException} object to be thrown. The value of this * parameter is saved for later retrieval by the - * {@link #getCause()} method. A {@code null} value is + * {@link #getCause()} method. A null value is * permitted and indicates that the cause is nonexistent or * unknown. * @return a reference to this {@code SOAPException} instance --- old/src/java.xml.ws/share/classes/javax/xml/ws/spi/FactoryFinder.java 2015-10-16 12:58:47.000000000 +0200 +++ new/src/java.xml.ws/share/classes/javax/xml/ws/spi/FactoryFinder.java 2015-10-16 12:58:47.000000000 +0200 @@ -27,8 +27,6 @@ import java.io.*; -import java.nio.file.Files; -import java.nio.file.Path; import java.nio.file.Paths; import java.util.Properties; import java.util.logging.Level; @@ -115,19 +113,19 @@ private static Object fromJDKProperties(String factoryId, String fallbackClassName, ClassLoader classLoader) { - Path path = null; + File f = null; try { String JAVA_HOME = System.getProperty("java.home"); - path = Paths.get(JAVA_HOME, "conf", "jaxws.properties"); + f = Paths.get(JAVA_HOME, "conf", "jaxws.properties").toFile(); // to ensure backwards compatibility - if (!Files.exists(path)) { - path = Paths.get(JAVA_HOME, "lib", "jaxws.properties"); + if (!f.exists()) { + f = Paths.get(JAVA_HOME, "lib", "jaxws.properties").toFile(); } - if (!Files.exists(path)) { + if (f.exists()) { Properties props = new Properties(); - try (InputStream inStream = Files.newInputStream(path)) { + try (InputStream inStream = new FileInputStream(f)) { props.load(inStream); } String factoryClassName = props.getProperty(factoryId); @@ -135,7 +133,9 @@ fallbackClassName, classLoader, EXCEPTION_HANDLER); } } catch (Exception ignored) { - logger.log(Level.SEVERE, "Error reading JAX-WS configuration from [" + path + + String absolutePath = f != null ? f.getAbsolutePath() : "null"; + logger.log(Level.SEVERE, "Error reading JAX-WS configuration from [" + + absolutePath + "] file. Check it is accessible and has correct format.", ignored); } return null; --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JAnnotationUse.java 2015-10-16 12:58:47.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JAnnotationUse.java 2015-10-16 12:58:47.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -293,11 +293,10 @@ * Adds a member value pair to this annotation * This can be used for e.g to specify *

    -      *        @XmlCollectionItem(type=Integer.class);
    -      * 
    -      * For adding a value of Class
    -      * @link
    -      * #annotationParam(java.lang.String, java.lang.Class)
    +      *        {@code @XmlCollectionItem(type=Integer.class);}
    +      * 
    + * For adding a value of {@code Class} + * {@link #annotationParam(java.lang.String, java.lang.Class)} * @param name * The simple name for this annotation param * --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JClass.java 2015-10-16 12:58:48.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JClass.java 2015-10-16 12:58:48.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -304,7 +304,7 @@ * Substitutes the type variables with their actual arguments. * *

    - * For example, when this class is Map<String,Map<V>>, + * For example, when this class is {@code Map>}, * (where V then doing * substituteParams( V, Integer ) returns a {@link JClass} * for {@code Map>}. --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JExpr.java 2015-10-16 12:58:49.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JExpr.java 2015-10-16 12:58:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -273,7 +273,7 @@ *

    * This method can be used as a short-cut to create a JExpression. * For example, instead of _a.gt(_b), you can write - * it as: JExpr.direct("a>b"). + * it as: {@code JExpr.direct("a>b")}. * *

    * Be warned that there is a danger in using this method, --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JExpression.java 2015-10-16 12:58:49.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JExpression.java 2015-10-16 12:58:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -97,12 +97,12 @@ JExpression shl(JExpression right); /** - * Returns "[this]>>[right]" + * Returns "{@code[this]>>[right]}" */ JExpression shr(JExpression right); /** - * Returns "[this]>>>[right]" + * Returns "{@code[this]>>>[right]}" */ JExpression shrz(JExpression right); --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java 2015-10-16 12:58:50.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java 2015-10-16 12:58:50.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -85,8 +85,8 @@ * ("my_children","MyChildren","myChildren", and "MY-CHILDREN", "CODE003-children" respectively) *

    * Although this method only works for English words, it handles non-English - * words gracefully (by just returning it as-is.) For example, 日本語 - * will be returned as-is without modified, not "日本語s" + * words gracefully (by just returning it as-is.) For example, "?????????" + * will be returned as-is without modified, not "?????????s" *

    * This method doesn't handle suffixes very well. For example, passing * "person56" will return "person56s", not "people56". --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/package-info.java 2015-10-16 12:58:51.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/package-info.java 2015-10-16 12:58:51.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -35,7 +35,7 @@ * then writing it out as text files that is Java source files. * The AST looks like this: * - * {@DotDiagram + * {@code DotDiagram digraph G { cls1 [label="JDefinedClass"]; cls2 [label="JDefinedClass"]; @@ -107,7 +107,7 @@ * pre-encoding tokens (like 'public') to the target encoding, * and consider exploting the subtree equivalence. * - * @ArchitectureDocument + * {@code ArchitectureDocument} */ package com.sun.codemodel.internal; --- old/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java 2015-10-16 12:58:52.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java 2015-10-16 12:58:51.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -37,7 +37,7 @@ * *

    * Note that this class doesn't escape other Unicode characters - * that are typically unsafe. For example, 愛 (A kanji + * that are typically unsafe. For example, ??? (A kanji * that means "love") can be considered as unsafe because * javac with English Windows cannot accept this character in the * source code. --- old/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java 2015-10-16 12:58:52.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java 2015-10-16 12:58:52.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -57,9 +57,9 @@ * +- X.class *

    *

    - * {@link ParallelWorldClassLoader}("foo/") would load {@code X.class} from - * {@code /foo/X.class} (note that X is defined in the root package, not - * {@code foo.X}. + * {@link ParallelWorldClassLoader}("foo/") would load X.class from + * /foo/X.class (note that X is defined in the root package, not + * foo.X. * *

    * This can be combined with {@link MaskingClassLoader} to mask classes which are loaded by the parent @@ -77,13 +77,11 @@ * +- X.class * *

    - * {@link ParallelWorldClassLoader}(MaskingClassLoader.class.getClassLoader()) - * would load {@code foo.X.class} from - * {@code /bar/foo.X.class} not the {@code foo.X.class} - * in the publicly visible place in the jar file, thus - * masking the parent classLoader from loading the class from {@code foo.X.class} + * {@link ParallelWorldClassLoader}(MaskingClassLoader.class.getClassLoader()) would load foo.X.class from + * /bar/foo.X.class not the foo.X.class in the publicly visible place in the jar file, thus + * masking the parent classLoader from loading the class from foo.X.class * (note that X is defined in the package foo, not - * {@code bar.foo.X}. + * bar.foo.X. * * @author Kohsuke Kawaguchi */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ConfigReader.java 2015-10-16 12:58:53.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ConfigReader.java 2015-10-16 12:58:53.000000000 +0200 @@ -181,7 +181,7 @@ /** * Lazily parsed schema for the binding file. */ - private static SchemaCache configSchema = new SchemaCache("config.xsd", Config.class); + private static SchemaCache configSchema = new SchemaCache("config.xsd", Config.class, true); /** --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties 2015-10-16 12:58:54.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties 2015-10-16 12:58:53.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -30,10 +30,10 @@ Non-existent directory: {0} VERSION = \ - schemagen 2.2.12-b150331.1824 + schemagen 2.3.0-SNAPSHOT FULLVERSION = \ - schemagen full version "2.2.12-b150331.1824" + schemagen full version "2.3.0-SNAPSHOT" USAGE = \ Usage: schemagen [-options ...] \n\ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties 2015-10-16 12:58:54.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties 2015-10-16 12:58:54.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.12-b150331.1824" +FULLVERSION = schemagen vollst\u00E4ndige Version "2.3.0-SNAPSHOT" USAGE = Verwendung: schemagen [-options ...] \nOptionen: \n\\ \\ \\ \\ -d : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties 2015-10-16 12:58:55.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties 2015-10-16 12:58:55.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = Directorio no existente: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = versi\u00F3n completa de schemagen "2.2.12-b150331.1824" +FULLVERSION = versi\u00F3n completa de schemagen "2.3.0-SNAPSHOT" USAGE = Sintaxis: schemagen [-options ...] \nOpciones: \n\\ \\ \\ \\ -d : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties 2015-10-16 12:58:56.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties 2015-10-16 12:58:56.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = version compl\u00E8te de schemagen "2.2.12-b150331.1824" +FULLVERSION = version compl\u00E8te de schemagen "2.3.0-SNAPSHOT" USAGE = Syntaxe : schemagen [-options ...] \nOptions : \n\ \ \ \ -d : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties 2015-10-16 12:58:56.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties 2015-10-16 12:58:56.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = Directory non esistente: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = versione completa schemagen "2.2.12-b150331.1824" +FULLVERSION = versione completa schemagen "2.3.0-SNAPSHOT" USAGE = Uso: schemagen [-options ...] \nOpzioni: \n\ \ \ \ -d : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties 2015-10-16 12:58:57.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties 2015-10-16 12:58:57.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.12-b150331.1824" +FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT" USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059 --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties 2015-10-16 12:58:58.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties 2015-10-16 12:58:58.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.12-b150331.1824" +FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT" USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] \n\uC635\uC158: \n\ \ \ \ -d : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4. --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties 2015-10-16 12:58:58.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties 2015-10-16 12:58:58.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0} -VERSION = gera\u00E7\u00E3o do esquema 2.2.12-b150331.1824 +VERSION = gera\u00E7\u00E3o do esquema 2.3.0-SNAPSHOT -FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.12-b150331.1824" +FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.3.0-SNAPSHOT" USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties 2015-10-16 12:58:59.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties 2015-10-16 12:58:59.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.12-b150331.1824" +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9009\u9879: \n\ \ \ \ -d : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties 2015-10-16 12:59:00.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties 2015-10-16 12:59:00.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, 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 @@ -27,8 +27,8 @@ BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0} -VERSION = schemagen 2.2.12-b150331.1824 +VERSION = schemagen 2.3.0-SNAPSHOT -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.12-b150331.1824" +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9078\u9805: \n\\ \\ \\ \\ -d : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java 2015-10-16 12:59:00.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java 2015-10-16 12:59:00.000000000 +0200 @@ -30,6 +30,7 @@ import com.sun.xml.internal.bind.util.Which; import javax.lang.model.SourceVersion; +import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; @@ -45,7 +46,6 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.logging.Level; @@ -248,7 +248,12 @@ if (episode != null) r.setEpisodeFile(episode); task.setProcessors(Collections.singleton(r)); - return task.call(); + boolean res = task.call(); + //Print compiler generated messages + for( Diagnostic d : diagnostics.getDiagnostics() ) { + System.err.println(d.toString()); + } + return res; } } --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/Const.java 2015-10-16 12:59:01.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/Const.java 2015-10-16 12:59:01.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -36,8 +36,8 @@ /** * Name of the annotation processing command-line option to take user-specified config files. - *

    - *

    + *

    + *

    * It can take multiple file names separately by {@link File#pathSeparator}. */ CONFIG_FILE_OPTION("jaxb.config"), --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java 2015-10-16 12:59:02.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java 2015-10-16 12:59:02.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -50,6 +50,7 @@ *

  1. manage mapping between namespace URIs and prefixes. * *
  2. TODO: provide support for interleaving. + * *

    * Auto-generated, do not edit. *

    @@ -70,7 +71,7 @@ * or the reset method is called. You can't replace the root * handler while parsing is in progress. *

    - * Usually a generated class that corresponds to the <start> + * Usually a generated class that corresponds to the {@code } * pattern will be used as the root handler, but any NGCCHandler * can be a root handler. * @@ -165,28 +166,28 @@ * Whitespace handling is a tricky business. Consider the following * schema fragment: * - *

    {@code
    +     * 
          * <element name="foo">
          *   <choice>
          *     <element name="bar"><empty/></element>
          *     <text/>
          *   </choice>
          * </element>
    -     * }</pre>
    +     * 
          *
          * Assume we hit the following instance:
    -     * 
    {@code
    +     * 
          * <foo> <bar/></foo>
    -     * }</pre>
    +     * 
          *
          * Then this first space needs to be ignored (for otherwise, we will
          * end up treating this space as the match to <text/> and won't
          * be able to process <bar>.)
          *
          * Now assume the following instance:
    -     * 
    {@code
    +     * 
          * <foo/>
    -     * }</pre>
    +     * 
          *
          * This time, we need to treat this empty string as a text, for
          * otherwise we won't be able to accept this instance.
    @@ -483,16 +484,16 @@
          * the top of the effective bindings. Because of the
          * timing difference between the startPrefixMapping method
          * and the execution of the corresponding actions,
    -     * this value can be different from {@code namespaces.size()}.
    +     * this value can be different from namespaces.size().
          * 

    * For example, consider the following schema: - *

    {@code
    +     * 
    
          *  <oneOrMore>
          *   <element name="foo"><empty/></element>
          *  </oneOrMore>
          *  code fragment X
          *  <element name="bob"/>
    -     * }</pre>
    +     * 
    * Code fragment X is executed after we see a startElement event, * but at this time the namespaces variable already include new * namespace bindings declared on "bob". --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties 2015-10-16 12:59:02.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties 2015-10-16 12:59:02.000000000 +0200 @@ -169,20 +169,20 @@ Driver.FailedToGenerateCode = \ Failed to produce code. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn Driver.FilePrologComment = \ - This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b150331.1824 \n\ - See http://java.sun.com/xml/jaxb \n\ + This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT \n\ + See https://jaxb.java.net/ \n\ Any modifications to this file will be lost upon recompilation of the source schema. \n\ Generated on: {0} \n Driver.Version = \ - xjc 2.2.12-b150331.1824 + xjc 2.3.0-SNAPSHOT Driver.FullVersion = \ - xjc full version "2.2.12-b150331.1824" + xjc full version "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties 2015-10-16 12:59:03.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties 2015-10-16 12:59:03.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b150331.1824 generiert \nSiehe http://java.sun.com/xml/jaxb \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT generiert \nSiehe https://jaxb.java.net/ \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.12-b150331.1824" +Driver.FullVersion = xjc vollst\u00E4ndige Version "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties 2015-10-16 12:59:04.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties 2015-10-16 12:59:04.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.12-b150331.1824 \nVisite http://java.sun.com/xml/jaxb \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.3.0-SNAPSHOT \nVisite https://jaxb.java.net/ \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = versi\u00F3n completa de xjc "2.2.12-b150331.1824" +Driver.FullVersion = versi\u00F3n completa de xjc "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties 2015-10-16 12:59:04.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties 2015-10-16 12:59:04.000000000 +0200 @@ -131,14 +131,14 @@ Driver.FailedToGenerateCode = Echec de la production du code. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.12-b150331.1824 \nVoir http://java.sun.com/xml/jaxb \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.3.0-SNAPSHOT \nVoir https://jaxb.java.net/ \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = version compl\u00E8te xjc "2.2.12-b150331.1824" +Driver.FullVersion = version compl\u00E8te xjc "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties 2015-10-16 12:59:05.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties 2015-10-16 12:59:05.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = Produzione del codice non riuscita. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.12-b150331.1824 \nVedere http://java.sun.com/xml/jaxb \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.3.0-SNAPSHOT \nVedere https://jaxb.java.net/ \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = versione completa xjc "2.2.12-b150331.1824" +Driver.FullVersion = versione completa xjc "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties 2015-10-16 12:59:06.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties 2015-10-16 12:59:06.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.12-b150331.1824\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttp://java.sun.com/xml/jaxb\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.3.0-SNAPSHOT\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://jaxb.java.net/\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.12-b150331.1824" +Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties 2015-10-16 12:59:06.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties 2015-10-16 12:59:06.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.12-b150331.1824 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttp://java.sun.com/xml/jaxb\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.3.0-SNAPSHOT \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://jaxb.java.net/\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n -Driver.Version = XJC 2.2.12-b150331.1824 +Driver.Version = XJC 2.3.0-SNAPSHOT -Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.12-b150331.1824" +Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties 2015-10-16 12:59:07.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties 2015-10-16 12:59:07.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.12-b150331.1824 \nConsulte http://java.sun.com/xml/jaxb \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.3.0-SNAPSHOT \nConsulte https://jaxb.java.net/ \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = vers\u00E3o completa de xjc "2.2.12-b150331.1824" +Driver.FullVersion = vers\u00E3o completa de xjc "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties 2015-10-16 12:59:08.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties 2015-10-16 12:59:08.000000000 +0200 @@ -131,14 +131,14 @@ Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002 -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.12-b150331.1824 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee http://java.sun.com/xml/jaxb \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.3.0-SNAPSHOT \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://jaxb.java.net/ \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.12-b150331.1824" +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties 2015-10-16 12:59:09.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties 2015-10-16 12:59:08.000000000 +0200 @@ -127,14 +127,14 @@ Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc. -# DO NOT localize the 2.2.12-b150331.1824 string - it is a token for an mvn -Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b150331.1824 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 http://java.sun.com/xml/jaxb \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n +# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://jaxb.java.net/ \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n -Driver.Version = xjc 2.2.12-b150331.1824 +Driver.Version = xjc 2.3.0-SNAPSHOT -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.12-b150331.1824" +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" -Driver.BuildID = 2.2.12-b150331.1824 +Driver.BuildID = 2.3.0-SNAPSHOT # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/ModelLoader.java 2015-10-16 12:59:09.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/ModelLoader.java 2015-10-16 12:59:09.000000000 +0200 @@ -38,6 +38,8 @@ import com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic; import com.sun.tools.internal.xjc.reader.internalizer.SCDBasedBindingSet; import com.sun.tools.internal.xjc.reader.internalizer.VersionChecker; +import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler; +import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGInternalizationLogic; import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder; import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl; import com.sun.tools.internal.xjc.reader.xmlschema.parser.CustomizationContextChecker; @@ -52,6 +54,15 @@ import com.sun.xml.internal.xsom.parser.XSOMParser; import javax.xml.XMLConstants; +import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder; +import com.sun.xml.internal.rngom.ast.util.CheckingSchemaBuilder; +import com.sun.xml.internal.rngom.digested.DPattern; +import com.sun.xml.internal.rngom.digested.DSchemaBuilderImpl; +import com.sun.xml.internal.rngom.parse.IllegalSchemaException; +import com.sun.xml.internal.rngom.parse.Parseable; +import com.sun.xml.internal.rngom.parse.compact.CompactParseable; +import com.sun.xml.internal.rngom.parse.xml.SAXParseable; +import com.sun.xml.internal.rngom.xml.sax.XMLReaderCreator; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -337,7 +348,7 @@ /** * Parses a set of schemas inside a WSDL file. * - * A WSDL file may contain multiple <xsd:schema> elements. + * A WSDL file may contain multiple {@code } elements. */ private XSSchemaSet loadWSDL() throws SAXException { --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Plugin.java 2015-10-16 12:59:10.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Plugin.java 2015-10-16 12:59:10.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -96,7 +96,7 @@ * Since options can appear in no particular order, * XJC allows sub-options of a plugin to show up before * the option that activates a plugin (one that's returned - * by {@link #getOptionName().) + * by {@link #getOptionName()}. * * But nevertheless a {@link Plugin} needs to be activated * to participate in further processing. --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/J2SJAXBModel.java 2015-10-16 12:59:11.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/J2SJAXBModel.java 2015-10-16 12:59:10.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -33,7 +33,7 @@ /** * {@link JAXBModel} that exposes additional information available - * only for the java->schema direction. + * only for the {@code java -> schema} direction. * * @author Kohsuke Kawaguchi */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/Mapping.java 2015-10-16 12:59:11.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/Mapping.java 2015-10-16 12:59:11.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -63,7 +63,7 @@ * Returns the fully-qualified name of the java class for the type of this element. * * TODO: does this method returns the name of the wrapper bean when it's qualified - * for the wrapper style? Seems no (consider <xs:element name='foo' type='xs:long' />), + * for the wrapper style? Seems no (consider {@code }), * but then how does JAX-RPC captures that bean? * * @return --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/S2JJAXBModel.java 2015-10-16 12:59:12.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/S2JJAXBModel.java 2015-10-16 12:59:12.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -39,7 +39,7 @@ /** * {@link JAXBModel} that exposes additional information available - * only for the schema->java direction. + * only for the {@code schema -> java} direction. * * @author Kohsuke Kawaguchi */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java 2015-10-16 12:59:13.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java 2015-10-16 12:59:12.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -53,10 +53,10 @@ * method to get the compiled {@link JAXBModel} object. * * - *

    Tips: namespace URI -> package customization

    + *

    Tips: namespace URI {@code -> } package customization

    *

    * The caller can feed the following synthesized schema - * to achive the namespace URI -> Java package customization: + * to achive the namespace URI {@code -> } Java package customization: *

    {@code
      *  package name conversion
    +     * Computes the namespace {@code URI -> package name} conversion
          * as specified by the JAXB spec.
          *
          * @param namespaceUri
    --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/PackageOutlineImpl.java	2015-10-16 12:59:14.000000000 +0200
    +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/PackageOutlineImpl.java	2015-10-16 12:59:14.000000000 +0200
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 2015, 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
    @@ -77,7 +77,7 @@
          * 

    * Null if no default * - * @see #calcDefaultValues(). + * @see #calcDefaultValues() . */ public String getMostUsedNamespaceURI() { return mostUsedNamespaceURI; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CElementInfo.java 2015-10-16 12:59:15.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CElementInfo.java 2015-10-16 12:59:14.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -60,7 +60,7 @@ * *

    * As an NType, it represents the Java representation of this element - * (either JAXBElement<T> or Foo). + * (either {@code JAXBElement} or Foo). * * @author Kohsuke Kawaguchi */ @@ -70,7 +70,7 @@ private final QName tagName; /** - * Represents {@code JAXBElement<ContentType>}. + * Represents {@code JAXBElement}. */ private NType type; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CEnumLeafInfo.java 2015-10-16 12:59:15.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CEnumLeafInfo.java 2015-10-16 12:59:15.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -53,8 +53,7 @@ * The structure of the generated class needs to precisely * follow the JAXB spec. * - * @author - * Kohsuke KAWAGUCHI + * @author Kohsuke KAWAGUCHI */ public final class CEnumLeafInfo implements EnumLeafInfo, NClass, CNonElement { @@ -83,7 +82,7 @@ * *

    * To parse XML into a constant, we use the base type - * to do lexical -> value, then use a map to pick up the right one. + * to do {@code lexical -> value}, then use a map to pick up the right one. * *

    * Hence this also represents the type of the Java value. --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java 2015-10-16 12:59:16.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java 2015-10-16 12:59:16.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -30,6 +30,8 @@ import java.util.Map; import javax.xml.XMLConstants; +import javax.xml.bind.annotation.XmlInlineBinaryData; +import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.namespace.QName; @@ -37,6 +39,7 @@ import com.sun.codemodel.internal.JClass; import com.sun.codemodel.internal.JJavaName; import com.sun.codemodel.internal.JType; +import com.sun.tools.internal.xjc.Plugin; import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer; import com.sun.tools.internal.xjc.model.nav.NClass; import com.sun.tools.internal.xjc.model.nav.NType; @@ -46,6 +49,7 @@ import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil; import com.sun.xml.internal.xsom.XSComponent; +import org.xml.sax.ErrorHandler; import org.xml.sax.Locator; /** @@ -81,7 +85,7 @@ public String javadoc=""; /** - * Property with {@link @XmlInlineBinaryData}. + * Property with {@link XmlInlineBinaryData}. */ public boolean inlineBinaryData; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java 2015-10-16 12:59:17.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java 2015-10-16 12:59:17.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -223,7 +223,7 @@ /** * Creates a {@link NType} representation for a parameterized type - * {@code RawType<ParamType1,ParamType2,...> }. + * {@code RawType }. */ public static NType createParameterizedType( NClass rawType, NType... args ) { return new NParameterizedType(rawType,args); --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/package-info.java 2015-10-16 12:59:17.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/package-info.java 2015-10-16 12:59:17.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -43,15 +43,15 @@ * *

    *
    Source location information - *
    {@link Locator} object that can be used to tell where the model components + *
    {@link org.xml.sax.Locator} object that can be used to tell where the model components * are created from in terms of the source file. Useful for error reporting. * *
    Source schema component - *
    {@link XSComponent} object from which the model components are created from. - * See {@link CCustomizable#getSchemaComponent()} for example. + *
    {@link com.sun.xml.internal.xsom.XSComponent} object from which the model components are created from. + * See {@link com.sun.tools.internal.xjc.model.CCustomizable#getSchemaComponent()} for example. * *
    Plugin customizations - *
    See {@link CCustomizable}. + *
    See {@link com.sun.tools.internal.xjc.model.CCustomizable}. *
    */ package com.sun.tools.internal.xjc.model; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/package-info.java 2015-10-16 12:59:18.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/package-info.java 2015-10-16 12:59:18.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -31,7 +31,7 @@ * * *

    XJC Architecture Diagram

    - * {@DotDiagram + * {@code DotDiagram digraph G { rankdir=TB; @@ -78,13 +78,13 @@ * and CodeModel. * * - * {@DotDiagram + * {@code DotDiagram * digraph G { * rankdir = LR; * schema -> reader -> model -> backend -> outline; * } * } * - * @ArchitectureDocument + * ArchitectureDocument (JAXB Architecture Document project) */ package com.sun.tools.internal.xjc; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/Const.java 2015-10-16 12:59:19.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/Const.java 2015-10-16 12:59:19.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -59,7 +59,7 @@ * Attribute name of the expected media type. * * @see WellKnownNamespace#XML_MIME_URI - * @see http://www.w3.org/TR/xml-media-types/ + * See http://www.w3.org/TR/xml-media-types/ */ public static final String EXPECTED_CONTENT_TYPES = "expectedContentTypes"; } --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIAttribute.java 2015-10-16 12:59:19.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIAttribute.java 2015-10-16 12:59:19.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -33,11 +33,11 @@ import org.w3c.dom.Attr; import org.w3c.dom.Element; -/** <attribute> declaration in the binding file. */ +/** {@code } declaration in the binding file. */ public class BIAttribute { /** - * Wraps a given <attribute> element. + * Wraps a given {@code } element. *

    * Should be created only from {@link BIElement}. */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConstructor.java 2015-10-16 12:59:20.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConstructor.java 2015-10-16 12:59:20.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -35,7 +35,7 @@ import org.xml.sax.Locator; /** - * <constructor> declaration in the binding file. + * {@code } declaration in the binding file. * *

    * Since JAXB will generate both interfaces and implementations, @@ -64,7 +64,7 @@ throw new AssertionError("this error should be catched by the validator"); } - /** <constructor> element in the source binding file. */ + /** {@code } element in the source binding file. */ private final Element dom; /** properties specified by @properties. */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIContent.java 2015-10-16 12:59:21.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIContent.java 2015-10-16 12:59:21.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -34,7 +34,7 @@ import org.w3c.dom.Element; /** - * Particles in the <content> declaration in the binding file. + * Particles in the {@code } declaration in the binding file. * */ public class BIContent @@ -100,7 +100,7 @@ /** * Gets the type of this property, if any. *

    - * <element-ref> particle doesn't have the type. + * {@code } particle doesn't have the type. * * @return * null if none is specified. --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConversion.java 2015-10-16 12:59:21.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConversion.java 2015-10-16 12:59:21.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -28,7 +28,7 @@ import com.sun.tools.internal.xjc.model.TypeUse; /** - * conversion declaration (<conversion> and <enumeration>). + * conversion declaration ({@code and }). */ public interface BIConversion { --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIElement.java 2015-10-16 12:59:22.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIElement.java 2015-10-16 12:59:22.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -40,12 +40,12 @@ /** - * <element> declaration in the binding file. + * {@code } declaration in the binding file. */ public final class BIElement { /** - * Wraps a given <element> element in the binding file. + * Wraps a given {@code } element in the binding file. * *

    * Should be created only from {@link BindInfo}. @@ -122,7 +122,7 @@ /** The parent {@link BindInfo} object to which this object belongs. */ final BindInfo parent; - /** <element> element which this object is wrapping. */ + /** {@code } element which this object is wrapping. */ private final Element e; /** --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIEnumeration.java 2015-10-16 12:59:23.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIEnumeration.java 2015-10-16 12:59:23.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -39,17 +39,17 @@ import org.w3c.dom.Element; /** - * <enumeration> declaration in the binding file. + * {@code } declaration in the binding file. */ public final class BIEnumeration implements BIConversion { - /** Creates an object from <enumeration> declaration. */ + /** Creates an object from {@code } declaration. */ private BIEnumeration( Element _e, TypeUse _xducer ) { this.e = _e; this.xducer = _xducer; } - /** <enumeration> element in DOM. */ + /** {@code } element in DOM. */ private final Element e; private final TypeUse xducer; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIInterface.java 2015-10-16 12:59:23.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIInterface.java 2015-10-16 12:59:23.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -31,7 +31,7 @@ import org.xml.sax.Locator; /** - * <interface> declaration in the binding file. + * {@code } declaration in the binding file. */ public final class BIInterface { @@ -47,7 +47,7 @@ fields = new String[0]; } - /** <interface> element in the binding file. */ + /** {@code } element in the binding file. */ private final Element dom; /** Name of the generated Java interface. */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIUserConversion.java 2015-10-16 12:59:24.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIUserConversion.java 2015-10-16 12:59:24.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -57,13 +57,13 @@ import org.xml.sax.SAXException; /** - * <conversion> declaration in the binding file. + * {@code } declaration in the binding file. * This declaration declares a conversion by user-specified methods. */ public class BIUserConversion implements BIConversion { /** - * Wraps a given <conversion> element in the binding file. + * Wraps a given {@code } element in the binding file. */ BIUserConversion( BindInfo bi, Element _e ) { this.owner = bi; @@ -104,7 +104,7 @@ /** The owner {@link BindInfo} object to which this object belongs. */ private final BindInfo owner; - /** <conversion> element which this object is wrapping. */ + /** {@code } element which this object is wrapping. */ private final Element e; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java 2015-10-16 12:59:25.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java 2015-10-16 12:59:25.000000000 +0200 @@ -289,7 +289,7 @@ /** * Lazily parsed schema for the binding file. */ - private static SchemaCache bindingFileSchema = new SchemaCache("bindingfile.xsd", BindInfo.class); + private static final SchemaCache bindingFileSchema = new SchemaCache("bindingfile.xsd", BindInfo.class, true); /** * Parses an InputSource into dom4j Document. --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java 2015-10-16 12:59:25.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java 2015-10-16 12:59:25.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -40,7 +40,7 @@ /** * XMLFilter that finds references to other schema files from * SAX events. - *

    + *

    * This implementation is a base implementation for typical case * where we just need to look for a particular attribute which * contains an URL to another schema file. --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMBuilder.java 2015-10-16 12:59:26.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMBuilder.java 2015-10-16 12:59:26.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -40,7 +40,7 @@ * Builds DOM while keeping the location information. * *

    - * This class also looks for outer most <jaxb:bindings> + * This class also looks for outer most {@code } * customizations. * * @author --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java 2015-10-16 12:59:27.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java 2015-10-16 12:59:27.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -30,6 +30,7 @@ import com.sun.tools.internal.xjc.ErrorReceiver; import com.sun.tools.internal.xjc.Options; import com.sun.tools.internal.xjc.reader.Const; +import com.sun.tools.internal.xjc.reader.xmlschema.parser.SchemaConstraintChecker; import com.sun.tools.internal.xjc.util.ErrorReceiverFilter; import com.sun.xml.internal.bind.marshaller.DataWriter; import com.sun.xml.internal.bind.v2.util.XmlFactory; @@ -83,7 +84,7 @@ * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) */ public final class DOMForest { - /** actual data storage map<SystemId,Document>. */ + /** actual data storage {@code map}. */ private final Map core = new HashMap(); /** @@ -100,7 +101,7 @@ /** Stores location information for all the trees in this forest. */ public final LocatorTable locatorTable = new LocatorTable(); - /** Stores all the outer-most <jaxb:bindings> customizations. */ + /** Stores all the outer-most {@code } customizations. */ public final Set outerMostBindings = new HashSet(); /** Used to resolve references to other schema documents. */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/InternalizationLogic.java 2015-10-16 12:59:27.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/InternalizationLogic.java 2015-10-16 12:59:27.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -71,7 +71,7 @@ * The owner DOMForest object. Probably useful only * to obtain context information, such as error handler. * @param bindings - * <jaxb:bindings> element or a customization element. + * {@code } element or a customization element. * @return * true if it's OK, false if not. */ @@ -82,7 +82,7 @@ * *

    * For example, in XML Schema, target nodes can be any schema - * element but it is always the <xsd:appinfo> element that + * element but it is always the {@code } element that * receives customization. * * @param target --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java 2015-10-16 12:59:28.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java 2015-10-16 12:59:28.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -79,7 +79,7 @@ private final XPath xpath; /** - * Internalize all <jaxb:bindings> customizations in the given forest. + * Internalize all {@code } customizations in the given forest. * * @return * if the SCD support is enabled, the return bindings need to be applied @@ -142,32 +142,6 @@ } /** - * Validates attributes of a <jaxb:bindings> element. - */ - private void validate( Element bindings ) { - NamedNodeMap atts = bindings.getAttributes(); - for( int i=0; i node specifies @scd to + * If the ancestor {@code } node specifies @scd to * specify the target via SCD, then this parameter represents that context. */ private void buildTargetNodeMap( Element bindings, @NotNull Node inheritedTarget, @@ -187,7 +161,8 @@ Node target = inheritedTarget; ArrayList targetMultiple = null; - validate(bindings); // validate this node + // validate this node ? + // validate(bindings); boolean required = true; boolean multiple = false; @@ -441,11 +416,11 @@ * Moves the "decl" node under the "target" node. * * @param decl - * A JAXB customization element (e.g., <jaxb:class>) + * A JAXB customization element (e.g., {@code }) * * @param target * XML Schema element under which the declaration should move. - * For example, <xs:element> + * For example, {@code } */ private void moveUnder( Element decl, Element target ) { Element realTarget = forest.logic.refineTarget(target); --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/relaxng/DatatypeLib.java 2015-10-16 12:59:29.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/relaxng/DatatypeLib.java 2015-10-16 12:59:29.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -25,6 +25,7 @@ package com.sun.tools.internal.xjc.reader.relaxng; +import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -44,11 +45,11 @@ * Datatype library's namespace URI. */ public final String nsUri; + private final Map types; - private final Map types = new HashMap(); - - public DatatypeLib(String nsUri) { + public DatatypeLib(String nsUri, Map types) { this.nsUri = nsUri; + this.types = Collections.unmodifiableMap(types); } /** @@ -61,16 +62,21 @@ /** * Datatype library for the built-in type. */ - public static final DatatypeLib BUILTIN = new DatatypeLib(""); + public static final DatatypeLib BUILTIN; /** * Datatype library for XML Schema datatypes. */ - public static final DatatypeLib XMLSCHEMA = new DatatypeLib(WellKnownNamespaces.XML_SCHEMA_DATATYPES); + public static final DatatypeLib XMLSCHEMA = + new DatatypeLib( + WellKnownNamespaces.XML_SCHEMA_DATATYPES, + SimpleTypeBuilder.builtinConversions); static { - BUILTIN.types.put("token",CBuiltinLeafInfo.TOKEN); - BUILTIN.types.put("string",CBuiltinLeafInfo.STRING); - XMLSCHEMA.types.putAll(SimpleTypeBuilder.builtinConversions); + Map builtinTypes = new HashMap<>(); + builtinTypes.put("token", CBuiltinLeafInfo.TOKEN); + builtinTypes.put("string", CBuiltinLeafInfo.STRING); + + BUILTIN = new DatatypeLib("", builtinTypes); } } --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGInternalizationLogic.java 2015-10-16 12:59:30.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGInternalizationLogic.java 2015-10-16 12:59:29.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -43,7 +43,7 @@ public class RELAXNGInternalizationLogic implements InternalizationLogic { /** - * This filter looks for <xs:import> and <xs:include> + * This filter looks for {@code and {@code } * and parses those documents referenced by them. */ private static final class ReferenceFinder extends AbstractReferenceFinderImpl { --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/BGMBuilder.java 2015-10-16 12:59:30.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/BGMBuilder.java 2015-10-16 12:59:30.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -76,7 +76,7 @@ /** * Root of the XML Schema binder. * - *

    + *
    * * @author Kohsuke Kawaguchi */ @@ -261,7 +261,7 @@ /** - * Name converter that implements "XML->Java name conversion" + * Name converter that implements "{@code XML -> Java} name conversion" * as specified in the spec. * * This object abstracts the detail that we use different name --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultClassBinder.java 2015-10-16 12:59:31.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultClassBinder.java 2015-10-16 12:59:31.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -75,7 +75,7 @@ import org.xml.sax.Locator; /** - * Default classBinder implementation. Honors <jaxb:class> customizations + * Default classBinder implementation. Honors {@code } customizations * and default bindings. */ final class DefaultClassBinder implements ClassBinder --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java 2015-10-16 12:59:32.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java 2015-10-16 12:59:32.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -140,7 +140,7 @@ private XSSimpleType initiatingType; /** {@link TypeUse}s for the built-in types. Read-only. */ - public static final Map builtinConversions = new HashMap(); + public static final Map builtinConversions; /** @@ -418,7 +418,7 @@ /** * Returns true if a type-safe enum should be created from - * the given simple type by default without an explicit <jaxb:enum> customization. + * the given simple type by default without an explicit {@code } customization. */ private boolean shouldBeMappedToTypeSafeEnumByDefault( XSRestrictionSimpleType type ) { @@ -876,7 +876,7 @@ // note that although xs:token and xs:normalizedString are not // specified in the spec, they need to be here because they // have different whitespace normalization semantics. - Map m = builtinConversions; + Map m = new HashMap(); // TODO: this is so dumb m.put("string", CBuiltinLeafInfo.STRING); @@ -911,6 +911,8 @@ m.put("normalizedString",CBuiltinLeafInfo.NORMALIZED_STRING); m.put("ID", CBuiltinLeafInfo.ID); m.put("IDREF", CBuiltinLeafInfo.IDREF); + + builtinConversions = Collections.unmodifiableMap(m); // TODO: handling dateTime, time, and date type // String[] names = { // "date", "dateTime", "time", "hexBinary" }; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIConversion.java 2015-10-16 12:59:32.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIConversion.java 2015-10-16 12:59:32.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -115,7 +115,7 @@ } /** - * User-specified <javaType> customization. + * User-specified {@code } customization. * * The parse/print methods are allowed to be null, * and their default values are determined based on the --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnum.java 2015-10-16 12:59:33.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnum.java 2015-10-16 12:59:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -82,8 +82,8 @@ } /** - * Gets the map that contains XML value->BIEnumMember pairs. - * This table is built from <enumMember> customizations. + * Gets the map that contains {@code XML value -> BIEnumMember} pairs. + * This table is built from {@code } customizations. * * Always return non-null. */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java 2015-10-16 12:59:34.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java 2015-10-16 12:59:34.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -71,7 +71,7 @@ /** - * Gets the name converter that will govern the XML->Java + * Gets the name converter that will govern the {@code XML -> Java} * name conversion process for this compilation. * *

    @@ -258,14 +258,14 @@ private BISerializable serializable = null; /** - * If <xjc:superClass> extension is specified, + * If {@code } extension is specified, * returns the specified root class. Otherwise null. */ @XmlElement(namespace=Const.XJC_EXTENSION_URI) ClassNameBean superClass = null; /** - * If <xjc:superInterface> extension is specified, + * If {@code } extension is specified, * returns the specified root class. Otherwise null. */ @XmlElement(namespace=Const.XJC_EXTENSION_URI) @@ -488,7 +488,7 @@ } /** - * Global <jaxb:javaType>. + * Global {@code }. */ static final class GlobalStandardConversion extends BIConversion.User { @XmlAttribute @@ -512,7 +512,7 @@ } /** - * Global <xjc:javaType>. + * Global {@code }. */ static final class GlobalVendorConversion extends BIConversion.UserAdapter { @XmlAttribute --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java 2015-10-16 12:59:34.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java 2015-10-16 12:59:34.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -36,7 +36,7 @@ import com.sun.xml.internal.xsom.XSComponent; /** - * Generates {@link @XmlInlineBinaryData}. + * Generates {@link XmlInlineBinaryData}. * * @author Kohsuke Kawaguchi */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISchemaBinding.java 2015-10-16 12:59:35.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISchemaBinding.java 2015-10-16 12:59:35.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -81,7 +81,7 @@ /** * If false, it means not to generate any classes from this namespace. * No ObjectFactory, no classes (the only way to bind them is by using - * <jaxb:class ref="..."/>) + * {@code }) */ @XmlAttribute(name="map") public boolean map = true; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXDom.java 2015-10-16 12:59:36.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXDom.java 2015-10-16 12:59:36.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -33,7 +33,7 @@ /** * Compatibility with 1.0. * - * Read <xjc:dom> as <jaxb:dom>. + * Read {@code as }. * * @author Kohsuke Kawaguchi */ --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java 2015-10-16 12:59:36.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java 2015-10-16 12:59:36.000000000 +0200 @@ -79,7 +79,7 @@ private Locator location; /** - * Documentation taken from <xs:documentation>s. + * Documentation taken from {@code s}. */ @XmlElement(namespace=WellKnownNamespace.XML_SCHEMA) private Documentation documentation; @@ -212,7 +212,7 @@ } /** - * Gets the documentation parsed from <xs:documentation>s. + * Gets the documentation parsed from {@code }s. * The returned collection is to be added to {@link JDocComment#append(Object)}. * @return maybe null. */ @@ -353,5 +353,5 @@ /** * Lazily parsed schema for the binding file. */ - public static SchemaCache bindingFileSchema = new SchemaCache("binding.xsd", BindInfo.class, true); + public static final SchemaCache bindingFileSchema = new SchemaCache("binding.xsd", BindInfo.class, true); } --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/EnumMemberMode.java 2015-10-16 12:59:37.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/EnumMemberMode.java 2015-10-16 12:59:37.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -45,7 +45,7 @@ ; /** - * The mode will change to this when there's <jaxb:enum> customization. + * The mode will change to this when there's {@code } customization. */ public EnumMemberMode getModeWithEnum() { if(this==SKIP) return ERROR; --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java 2015-10-16 12:59:38.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java 2015-10-16 12:59:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -45,8 +45,8 @@ * Checks if binding declarations are placed where they are allowed. * *

    - * For example, if a <jaxb:property> customization is given under - * the <xs:simpleContent> element, this class raises an error. + * For example, if a {@code } customization is given under + * the {@code } element, this class raises an error. * *

    * our main checkpoint of misplaced customizations are in BGMBuilder. @@ -60,7 +60,7 @@ * *

    * For example, a property customization is allowed on a complex type - * schema component, but it's only allowed on the <complexType> + * schema component, but it's only allowed on the {@code } * element. The spec team informed us that they would consider resolving * this discrepancy in favor of RI, but meanwhile we need to detect * errors correctly. @@ -94,9 +94,9 @@ * of that type. * *

    - * For simple types, customizations are allowed only under the <xs:simpleType> + * For simple types, customizations are allowed only under the {@code } * element, and for complex types they are allowed only under the - * <xs:cimplexType> element. + * {@code } element. * *

    * So the bottom line is that it would be suffice if we just make sure --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java 2015-10-16 12:59:38.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java 2015-10-16 12:59:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -48,7 +48,7 @@ /** * Checks XML Schema XML representation constraints and * schema component constraints by using JAXP 1.3 validation framework. - *

    + *

    * * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) * @author Ryan Shoemaker (ryan.shoemaker@sun.com) --- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java 2015-10-16 12:59:39.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java 2015-10-16 12:59:39.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -45,7 +45,7 @@ public class XMLSchemaInternalizationLogic implements InternalizationLogic { /** - * This filter looks for <xs:import> and <xs:include> + * This filter looks for {@code and } * and parses those documents referenced by them. */ private static final class ReferenceFinder extends AbstractReferenceFinderImpl { --- old/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/DTDEventListener.java 2015-10-16 12:59:40.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/DTDEventListener.java 2015-10-16 12:59:40.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -94,7 +94,7 @@ /** * Receive notification of an external parsed general entity * declaration event. - *

    + *

    *

    If a system identifier is present, and it is a relative URL, the * parser will have resolved it fully before passing it through this * method to a listener.

    @@ -127,7 +127,7 @@ /** * Receive notification of an external parameter entity declaration * event. - *

    + *

    *

    If a system identifier is present, and it is a relative URL, the * parser will have resolved it fully before passing it through this * method to a listener.

    @@ -164,7 +164,7 @@ /** * Receive notification that a comment has been read. - *

    + *

    *

    Note that processing instructions are the mechanism designed * to hold information for consumption by applications, not comments. * XML systems may rely on applications being able to access information @@ -179,17 +179,17 @@ /** * Receive notification of character data. - *

    + *

    *

    The Parser will call this method to report each chunk of * character data. SAX parsers may return all contiguous character * data in a single chunk, or they may split it into several * chunks; however, all of the characters in any single event * must come from the same external entity, so that the Locator * provides useful information.

    - *

    + *

    *

    The application must not attempt to read from the array * outside of the specified range.

    - *

    + *

    *

    Note that some parsers will report whitespace using the * ignorableWhitespace() method rather than this one (validating * parsers must do so).

    @@ -206,18 +206,18 @@ /** * Receive notification of ignorable whitespace in element content. - *

    + *

    *

    Validating Parsers must use this method to report each chunk * of ignorable whitespace (see the W3C XML 1.0 recommendation, * section 2.10): non-validating parsers may also use this method * if they are capable of parsing and using content models.

    - *

    + *

    *

    SAX parsers may return all contiguous whitespace in a single * chunk, or they may split it into several chunks; however, all of * the characters in any single event must come from the same * external entity, so that the Locator provides useful * information.

    - *

    + *

    *

    The application must not attempt to read from the array * outside of the specified range.

    * @@ -279,7 +279,7 @@ * this elemen has child content model. The actual content model will * be reported by childElement, startModelGroup, endModelGroup, and * connector methods. Possible call sequences are: - *

    + *

    * START := MODEL_GROUP * MODEL_GROUP := startModelGroup TOKEN (connector TOKEN)* endModelGroup * TOKEN := childElement @@ -300,8 +300,8 @@ /** * For each entry in an ATTLIST declaration, * this event will be fired. - *

    - *

    + *

    + *

    * DTD allows the same attributes to be declared more than * once, and in that case the first one wins. I think * this method will be only fired for the first one, @@ -329,11 +329,9 @@ /** * Connectors in one model group is guaranteed to be the same. - *

    - *

    + *

    + *

    * IOW, you'll never see an event sequence like (a|b,c) - * - * @return {@link #CHOICE} or {@link #SEQUENCE}. */ public void connector(short connectorType) throws SAXException; --- old/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/DTDParser.java 2015-10-16 12:59:41.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/DTDParser.java 2015-10-16 12:59:40.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -38,28 +38,31 @@ import java.util.Locale; import java.util.Set; import java.util.Vector; +import java.util.logging.Level; +import java.util.logging.Logger; /** * This implements parsing of XML 1.0 DTDs. - *

    - * This conforms to the portion of the XML 1.0 specification related - * to the external DTD subset. - *

    - * For multi-language applications (such as web servers using XML - * processing to create dynamic content), a method supports choosing - * a locale for parser diagnostics which is both understood by the - * message recipient and supported by the parser. - *

    - * This parser produces a stream of parse events. It supports some - * features (exposing comments, CDATA sections, and entity references) - * which are not required to be reported by conformant XML processors. + *

    + * This conforms to the portion of the XML 1.0 specification related to the + * external DTD subset. + *

    + * For multi-language applications (such as web servers using XML processing to + * create dynamic content), a method supports choosing a locale for parser + * diagnostics which is both understood by the message recipient and supported + * by the parser. + *

    + * This parser produces a stream of parse events. It supports some features + * (exposing comments, CDATA sections, and entity references) which are not + * required to be reported by conformant XML processors. * * @author David Brownell * @author Janet Koenig * @author Kohsuke KAWAGUCHI - * @version $Id: DTDParser.java,v 1.2 2009/04/16 15:25:49 snajper Exp $ + * @version $Id: DTDParser.java,v 1.2 2009-04-16 15:25:49 snajper Exp $ */ public class DTDParser { + public final static String TYPE_CDATA = "CDATA"; public final static String TYPE_ID = "ID"; public final static String TYPE_IDREF = "IDREF"; @@ -70,47 +73,39 @@ public final static String TYPE_NMTOKENS = "NMTOKENS"; public final static String TYPE_NOTATION = "NOTATION"; public final static String TYPE_ENUMERATION = "ENUMERATION"; - - // stack of input entities being merged private InputEntity in; - // temporaries reused during parsing private StringBuffer strTmp; - private char nameTmp []; + private char nameTmp[]; private NameCache nameCache; - private char charTmp [] = new char[2]; - + private char charTmp[] = new char[2]; // temporary DTD parsing state private boolean doLexicalPE; - // DTD state, used during parsing // private SimpleHashtable elements = new SimpleHashtable (47); protected final Set declaredElements = new java.util.HashSet(); private SimpleHashtable params = new SimpleHashtable(7); - // exposed to package-private subclass Hashtable notations = new Hashtable(7); SimpleHashtable entities = new SimpleHashtable(17); - private SimpleHashtable ids = new SimpleHashtable(); - // listeners for DTD parsing events private DTDEventListener dtdHandler; - private EntityResolver resolver; private Locale locale; - // string constants -- use these copies so "==" works // package private static final String strANY = "ANY"; static final String strEMPTY = "EMPTY"; + private static final Logger LOGGER = Logger.getLogger(DTDParser.class.getName()); + /** * Used by applications to request locale for diagnostics. * - * @param l The locale to use, or null to use system defaults - * (which may include only message IDs). + * @param l The locale to use, or null to use system defaults (which may + * include only message IDs). */ public void setLocale(Locale l) throws SAXException { @@ -129,20 +124,19 @@ } /** - * Chooses a client locale to use for diagnostics, using the first - * language specified in the list that is supported by this parser. - * That locale is then set using - * setLocale(). Such a list could be provided by a variety of user - * preference mechanisms, including the HTTP Accept-Language - * header field. + * Chooses a client locale to use for diagnostics, using the first language + * specified in the list that is supported by this parser. That locale is + * then set using setLocale(). + * Such a list could be provided by a variety of user preference mechanisms, + * including the HTTP Accept-Language header field. * * @param languages Array of language specifiers, ordered with the most - * preferable one at the front. For example, "en-ca" then "fr-ca", - * followed by "zh_CN". Both RFC 1766 and Java styles are supported. + * preferable one at the front. For example, "en-ca" then "fr-ca", followed + * by "zh_CN". Both RFC 1766 and Java styles are supported. * @return The chosen locale, or null. * @see MessageCatalog */ - public Locale chooseLocale(String languages []) + public Locale chooseLocale(String languages[]) throws SAXException { Locale l = messages.chooseLocale(languages); @@ -174,24 +168,29 @@ */ public void setDtdHandler(DTDEventListener handler) { dtdHandler = handler; - if (handler != null) + if (handler != null) { handler.setDocumentLocator(new Locator() { + @Override public String getPublicId() { return DTDParser.this.getPublicId(); } + @Override public String getSystemId() { return DTDParser.this.getSystemId(); } + @Override public int getLineNumber() { return DTDParser.this.getLineNumber(); } + @Override public int getColumnNumber() { return DTDParser.this.getColumnNumber(); } }); + } } /** @@ -215,25 +214,25 @@ */ public void parse(String uri) throws IOException, SAXException { - InputSource in; + InputSource inSource; init(); // System.out.println ("parse (\"" + uri + "\")"); - in = resolver.resolveEntity(null, uri); + inSource = resolver.resolveEntity(null, uri); // If custom resolver punts resolution to parser, handle it ... - if (in == null) { - in = Resolver.createInputSource(new java.net.URL(uri), false); + if (inSource == null) { + inSource = Resolver.createInputSource(new java.net.URL(uri), false); // ... or if custom resolver doesn't correctly construct the // input entity, patch it up enough so relative URIs work, and // issue a warning to minimize later confusion. - } else if (in.getSystemId() == null) { + } else if (inSource.getSystemId() == null) { warning("P-065", null); - in.setSystemId(uri); + inSource.setSystemId(uri); } - parseInternal(in); + parseInternal(inSource); } // makes sure the parser is reset to "before a document" @@ -263,12 +262,15 @@ builtin("quot", "\""); builtin("apos", "'"); - if (locale == null) + if (locale == null) { locale = Locale.getDefault(); - if (resolver == null) + } + if (resolver == null) { resolver = new Resolver(); - if (dtdHandler == null) + } + if (dtdHandler == null) { dtdHandler = new DTDHandlerBase(); + } } private void builtin(String entityName, String entityValue) { @@ -277,7 +279,6 @@ entities.put(entityName, entity); } - //////////////////////////////////////////////////////////////// // // parsing is by recursive descent, code roughly @@ -289,13 +290,13 @@ // relatively easy to get diagnostics that make sense. // //////////////////////////////////////////////////////////////// - - + @SuppressWarnings("CallToThreadDumpStack") private void parseInternal(InputSource input) throws IOException, SAXException { - if (input == null) + if (input == null) { fatal("P-000"); + } try { in = InputEntity.getInputEntity(dtdHandler, locale); @@ -312,8 +313,7 @@ externalParameterEntity(externalSubset); if (!in.isEOF()) { - fatal("P-001", new Object[] - {Integer.toHexString(((int) getc()))}); + fatal("P-001", new Object[]{Integer.toHexString(((int) getc()))}); } afterRoot(); dtdHandler.endDTD(); @@ -329,10 +329,7 @@ fatal("P-003", null); } } catch (RuntimeException e) { - // Don't discard location that triggered the exception - // ## Should properly wrap exception - System.err.print("Internal DTD parser error: "); // ## - e.printStackTrace(); + LOGGER.log(Level.SEVERE, "Internal DTD parser error.", e); throw new SAXParseException(e.getMessage() != null ? e.getMessage() : e.getClass().getName(), getPublicId(), getSystemId(), @@ -368,24 +365,22 @@ // references, and only now can we know if they're all resolved. for (Enumeration e = ids.keys(); - e.hasMoreElements(); - ) { + e.hasMoreElements();) { String id = (String) e.nextElement(); Boolean value = (Boolean) ids.get(id); - if (Boolean.FALSE == value) + if (Boolean.FALSE.equals(value)) { error("V-024", new Object[]{id}); + } } } - // role is for diagnostics private void whitespace(String roleId) throws IOException, SAXException { // [3] S ::= (#x20 | #x9 | #xd | #xa)+ if (!maybeWhitespace()) { - fatal("P-004", new Object[] - {messages.getMessage(locale, roleId)}); + fatal("P-004", new Object[]{messages.getMessage(locale, roleId)}); } } @@ -393,8 +388,9 @@ private boolean maybeWhitespace() throws IOException, SAXException { - if (!doLexicalPE) + if (!doLexicalPE) { return in.maybeWhitespace(); + } // see getc() for the PE logic -- this lets us splice // expansions of PEs in "anywhere". getc() has smarts, @@ -418,8 +414,9 @@ // this gracefully ends things when we stop playing // with internal parameters. caller should have a // grammar rule allowing whitespace at end of entity. - if (in.isEOF() && !in.isInternal()) + if (in.isEOF() && !in.isInternal()) { return saw; + } c = getc(); } ungetc(); @@ -452,8 +449,9 @@ // [7] Nmtoken ::= (Namechar)+ char c = getc(); - if (!XmlChars.isNameChar(c)) - fatal("P-006", new Object[]{new Character(c)}); + if (!XmlChars.isNameChar(c)) { + fatal("P-006", new Object[]{Character.valueOf(c)}); + } return nameCharString(c).name; } @@ -461,18 +459,18 @@ // internal references) so we can't use strTmp; it's also // a hotspot for CPU and memory in the parser (called at least // once for each element) so this has been optimized a bit. - private NameCacheEntry nameCharString(char c) throws IOException, SAXException { int i = 1; nameTmp[0] = c; - for (; ;) { - if ((c = in.getNameChar()) == 0) + for (;;) { + if ((c = in.getNameChar()) == 0) { break; + } if (i >= nameTmp.length) { - char tmp [] = new char[nameTmp.length + 10]; + char tmp[] = new char[nameTmp.length + 10]; System.arraycopy(nameTmp, 0, tmp, 0, nameTmp.length); nameTmp = tmp; } @@ -490,6 +488,7 @@ // or else partially normalized attribute value (the first bit // of 3.3.3's spec, without the "if not CDATA" bits). // + @SuppressWarnings("UnusedAssignment") private void parseLiteral(boolean isEntityValue) throws IOException, SAXException { @@ -516,7 +515,7 @@ // scan, allowing entity push/pop wherever ... // expanded entities can't terminate the literal! - for (; ;) { + for (;;) { if (in != source && in.isEOF()) { // we don't report end of parsed entities // within attributes (no SAX hooks) @@ -547,20 +546,22 @@ } expandEntityInLiteral(entityName, entities, isEntityValue); - // character references are always included immediately - } else if ((c = getc()) == '#') { + } else if ((getc()) == '#') { int tmp = parseCharNumber(); if (tmp > 0xffff) { tmp = surrogatesToCharTmp(tmp); strTmp.append(charTmp[0]); - if (tmp == 2) + if (tmp == 2) { strTmp.append(charTmp[1]); - } else + } + } else { strTmp.append((char) tmp); - } else + } + } else { fatal("P-009"); + } continue; } @@ -573,8 +574,9 @@ nextChar(';', "F-021", entityName); expandEntityInLiteral(entityName, params, isEntityValue); continue; - } else + } else { fatal("P-011"); + } } // For attribute values ... @@ -586,8 +588,9 @@ } // "<" not legal in parsed literals ... - if (c == '<') + if (c == '<') { fatal("P-012"); + } } strTmp.append(c); @@ -597,7 +600,7 @@ // does a SINGLE expansion of the entity (often reparsed later) private void expandEntityInLiteral(String name, SimpleHashtable table, - boolean isEntityValue) + boolean isEntityValue) throws IOException, SAXException { Object entity = table.get(name); @@ -607,8 +610,10 @@ pushReader(value.buf, name, !value.isPE); } else if (entity instanceof ExternalEntity) { - if (!isEntityValue) // must be a PE ... + if (!isEntityValue) // must be a PE ... + { fatal("P-013", new Object[]{name}); + } // XXX if this returns false ... pushReader((ExternalEntity) entity); @@ -625,32 +630,31 @@ // [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") // for PUBLIC and SYSTEM literals, also "' - // NOTE: XML spec should explicitly say that PE ref syntax is // ignored in PIs, comments, SystemLiterals, and Pubid Literal // values ... can't process the XML spec's own DTD without doing // that for comments. - private String getQuotedString(String type, String extra) throws IOException, SAXException { // use in.getc to bypass PE processing char quote = in.getc(); - if (quote != '\'' && quote != '"') + if (quote != '\'' && quote != '"') { fatal("P-015", new Object[]{ - messages.getMessage(locale, type, new Object[]{extra}) - }); + messages.getMessage(locale, type, new Object[]{extra}) + }); + } char c; strTmp = new StringBuffer(); - while ((c = in.getc()) != quote) + while ((c = in.getc()) != quote) { strTmp.append((char) c); + } return strTmp.toString(); } - private String parsePublicId() throws IOException, SAXException { // [12] PubidLiteral ::= ('"' PubidChar* '"') | ("'" PubidChar* "'") @@ -660,8 +664,9 @@ char c = retval.charAt(i); if (" \r\n-'()+,./:=?;!*#@$_%0123456789".indexOf(c) == -1 && !(c >= 'A' && c <= 'Z') - && !(c >= 'a' && c <= 'z')) - fatal("P-016", new Object[]{new Character(c)}); + && !(c >= 'a' && c <= 'z')) { + fatal("P-016", new Object[]{Character.valueOf(c)}); + } } strTmp = new StringBuffer(); strTmp.append(retval); @@ -670,44 +675,47 @@ // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) // handled by: InputEntity.parsedContent() - private boolean maybeComment(boolean skipStart) throws IOException, SAXException { // [15] Comment ::= '' - if (!in.peek(skipStart ? "!--" : "