--- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/AnyTypeAdapter.java 2017-10-24 14:21:30.056129965 +0100 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/AnyTypeAdapter.java 2017-10-24 14:21:29.764129966 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ /** * {@link XmlAdapter} useful for mapping interfaces. * - * See The JAXB user's guide + * See The JAXB user's guide * for more about this adapter class. * * @author Kohsuke Kawaguchi --- old/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/CycleRecoverable.java 2017-10-24 14:21:30.600129963 +0100 +++ new/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/CycleRecoverable.java 2017-10-24 14:21:30.308129964 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,14 +32,13 @@ * to handle cycles in the object graph. * *

- * As discussed in + * As discussed in * the users' guide, normally a cycle in the object graph causes the marshaller to report an error, * and when an error is found, the JAXB RI recovers by cutting the cycle arbitrarily. * This is not always a desired behavior. * *

* Implementing this interface allows user application to change this behavior. - * Also see this related discussion. * * @since JAXB 2.1 EA2 * @author Kohsuke Kawaguchi --- old/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java 2017-10-24 14:21:31.148129961 +0100 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java 2017-10-24 14:21:30.848129962 +0100 @@ -182,6 +182,9 @@ Map properties) throws JAXBException { try { + + ModuleUtil.delegateAddOpensToImplModule(contextPathClasses, spFactory); + /* * javax.xml.bind.context.factory points to a class which has a * static method called 'createContext' that @@ -215,8 +218,6 @@ throw handleClassCastException(context.getClass(), JAXBContext.class); } - ModuleUtil.delegateAddOpensToImplModule(contextPathClasses, spFactory); - return (JAXBContext) context; } catch (InvocationTargetException x) { // throw if it is exception not to be wrapped @@ -274,6 +275,7 @@ Map properties, Class spFactory) throws JAXBException { try { + ModuleUtil.delegateAddOpensToImplModule(classes, spFactory); Method m = spFactory.getMethod("createContext", Class[].class, Map.class); Object obj = instantiateProviderIfNecessary(spFactory); @@ -282,7 +284,6 @@ // the cast would fail, so generate an exception with a nice message throw handleClassCastException(context.getClass(), JAXBContext.class); } - ModuleUtil.delegateAddOpensToImplModule(classes, spFactory); return (JAXBContext) context; } catch (NoSuchMethodException | IllegalAccessException e) { @@ -328,9 +329,8 @@ JAXBContextFactory.class, logger, EXCEPTION_HANDLER); if (obj != null) { - JAXBContext context = obj.createContext(contextPath, classLoader, properties); ModuleUtil.delegateAddOpensToImplModule(contextPathClasses, obj.getClass()); - return context; + return obj.createContext(contextPath, classLoader, properties); } // to ensure backwards compatibility @@ -385,9 +385,8 @@ ServiceLoaderUtil.firstByServiceLoader(JAXBContextFactory.class, logger, EXCEPTION_HANDLER); if (factory != null) { - JAXBContext context = factory.createContext(classes, properties); ModuleUtil.delegateAddOpensToImplModule(classes, factory.getClass()); - return context; + return factory.createContext(classes, properties); } // to ensure backwards compatibility --- old/src/java.xml.bind/share/classes/javax/xml/bind/ModuleUtil.java 2017-10-24 14:21:31.692129959 +0100 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/ModuleUtil.java 2017-10-24 14:21:31.400129960 +0100 @@ -130,9 +130,6 @@ */ static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) throws JAXBException { final Module implModule = factorySPI.getModule(); - if (!implModule.isNamed()) { - return; - } Module jaxbModule = JAXBContext.class.getModule(); --- old/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java 2017-10-24 14:21:32.228129957 +0100 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java 2017-10-24 14:21:31.932129958 +0100 @@ -251,7 +251,7 @@ * * JAXBElement Property * Value - * + * * * name * {@code xml element name} --- old/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java 2017-10-24 14:21:32.776129955 +0100 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java 2017-10-24 14:21:32.480129956 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,7 @@ * * *

Related Documentation

- *

+ * * For overviews, tutorials, examples, guides, and tool documentation, * please see: *