From cd2842cbd486320342a64f507388709b64ead460 Mon Sep 17 00:00:00 2001 From: Jack Li Date: Tue, 18 Jul 2017 03:35:25 -0700 Subject: [PATCH 1/6] Fix JDK-8184726, add exception for java.base --- jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java index 58f85a50..563e88b6 100644 --- a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java +++ b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java @@ -158,7 +158,7 @@ static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) t continue; } //report error if they are not open to java.xml.bind - if (!classModule.isOpen(packageName, jaxbModule)) { + if (!classModule.isOpen(packageName, jaxbModule) && !"java.base".equals(classModule.getName())) { throw new JAXBException(Messages.format(Messages.JAXB_CLASSES_NOT_OPEN, packageName, cls.getName(), classModule.getName())); } From e2ef71d46f356e0448e10ae9ea3d7e0cac13b95f Mon Sep 17 00:00:00 2001 From: Jack Li Date: Tue, 18 Jul 2017 20:02:54 -0700 Subject: [PATCH 2/6] Revise codes for JDK-8184726 --- jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java index 563e88b6..67f7634b 100644 --- a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java +++ b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java @@ -153,15 +153,15 @@ static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) t for (Class cls : classes) { final Module classModule = cls.getModule(); final String packageName = cls.getPackageName(); - //no need for unnamed - if (!classModule.isNamed()) { - continue; - } //report error if they are not open to java.xml.bind if (!classModule.isOpen(packageName, jaxbModule) && !"java.base".equals(classModule.getName())) { throw new JAXBException(Messages.format(Messages.JAXB_CLASSES_NOT_OPEN, packageName, cls.getName(), classModule.getName())); } + //no need for unnamed + if (!classModule.isNamed()) { + continue; + } //propagate openness to impl module classModule.addOpens(packageName, implModule); if (logger.isLoggable(Level.FINE)) { From 09171cd6ed8fe0fe5d0e81b771071cb70a904018 Mon Sep 17 00:00:00 2001 From: Jack Li Date: Thu, 20 Jul 2017 03:08:47 -0700 Subject: [PATCH 3/6] Fix java.lang.IllegalCallerException --- jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java index 67f7634b..2c5d63dd 100644 --- a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java +++ b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java @@ -163,7 +163,9 @@ static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) t continue; } //propagate openness to impl module - classModule.addOpens(packageName, implModule); + if (!"java.base".equals(classModule.getName())){ + classModule.addOpens(packageName, implModule); + } if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Propagating openness of package {0} in {1} to {2}.", new String[]{ packageName, classModule.getName(), implModule.getName() }); From 2c6a48e0e17950af29553b3553ae7ec6b18d0e69 Mon Sep 17 00:00:00 2001 From: Jack Li Date: Thu, 20 Jul 2017 18:33:25 -0700 Subject: [PATCH 4/6] Revise codes --- .../src/main/mr-jar/javax/xml/bind/ModuleUtil.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java index 2c5d63dd..f0c6143a 100644 --- a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java +++ b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java @@ -153,19 +153,17 @@ static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) t for (Class cls : classes) { final Module classModule = cls.getModule(); final String packageName = cls.getPackageName(); + //no need for unnamed + if (!classModule.isNamed() || "java.base".equals(classModule.getName())) { + continue; + } //report error if they are not open to java.xml.bind - if (!classModule.isOpen(packageName, jaxbModule) && !"java.base".equals(classModule.getName())) { + if (!classModule.isOpen(packageName, jaxbModule)) { throw new JAXBException(Messages.format(Messages.JAXB_CLASSES_NOT_OPEN, packageName, cls.getName(), classModule.getName())); } - //no need for unnamed - if (!classModule.isNamed()) { - continue; - } //propagate openness to impl module - if (!"java.base".equals(classModule.getName())){ - classModule.addOpens(packageName, implModule); - } + classModule.addOpens(packageName, implModule); if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Propagating openness of package {0} in {1} to {2}.", new String[]{ packageName, classModule.getName(), implModule.getName() }); From c29eb2371bb00562263823c9849d08a9376fd4f1 Mon Sep 17 00:00:00 2001 From: Jack Li Date: Tue, 22 Aug 2017 00:16:24 -0700 Subject: [PATCH 5/6] METRO-414: Update JAXB-API to support JDK 10 --- jaxb-api-test/pom.xml | 4 ++-- jaxb-api/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jaxb-api-test/pom.xml b/jaxb-api-test/pom.xml index 384bc503..cfca9578 100644 --- a/jaxb-api-test/pom.xml +++ b/jaxb-api-test/pom.xml @@ -104,7 +104,7 @@ jdk9 - 9 + [9,) @@ -129,4 +129,4 @@ - \ No newline at end of file + diff --git a/jaxb-api/pom.xml b/jaxb-api/pom.xml index 182bdb8c..c68bec5d 100644 --- a/jaxb-api/pom.xml +++ b/jaxb-api/pom.xml @@ -345,7 +345,7 @@ href='http://jaxb.java.net'>http://jaxb.java.net jdk9 - 9 + [9,) @@ -475,4 +475,4 @@ href='http://jaxb.java.net'>http://jaxb.java.net - \ No newline at end of file + From 997cf4d44b1ee7691b1ce9fb4527a4fd2687f7c8 Mon Sep 17 00:00:00 2001 From: Jack Li Date: Tue, 22 Aug 2017 00:19:55 -0700 Subject: [PATCH 6/6] remove change of ModuleUtil.java --- jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java index f0c6143a..58f85a50 100644 --- a/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java +++ b/jaxb-api/src/main/mr-jar/javax/xml/bind/ModuleUtil.java @@ -154,7 +154,7 @@ static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) t final Module classModule = cls.getModule(); final String packageName = cls.getPackageName(); //no need for unnamed - if (!classModule.isNamed() || "java.base".equals(classModule.getName())) { + if (!classModule.isNamed()) { continue; } //report error if they are not open to java.xml.bind