[11u] RFR: 8241770 Module xxxAnnotation() methods throw NCDFE if module-info.class found as resource in unnamed module
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Tue Dec 22 12:01:32 UTC 2020
Hi Martin,
The change looks good.
The additional argument is only used for an optional printout of platform information,
so not relevant for this fix - besides that it is null anyways.
Best regards,
Goetz.
From: Doerr, Martin <martin.doerr at sap.com>
Sent: Monday, December 21, 2020 9:54 PM
To: core-libs-dev <core-libs-dev at openjdk.java.net>; jdk-updates-dev at openjdk.java.net
Cc: Langer, Christoph <christoph.langer at sap.com>; Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
Subject: [11u] RFR: 8241770 Module xxxAnnotation() methods throw NCDFE if module-info.class found as resource in unnamed module
Hi,
JDK-8248901 is backported to 11.0.11-oracle. I'd like to backport it for parity.
Change applies cleanly, but 11u needs minor adaptation:
- Keep "import java.util.Iterator;" in Module.java.
- "toModuleInfo" has one argument less in 11u, so pass one "null" less.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8241770
Original change:
https://hg.openjdk.java.net/jdk/jdk/rev/493e7c5a7c30
11u backport:
http://cr.openjdk.java.net/~mdoerr/8241770_module_11u/webrev.00/
Manual change in detail:
diff -r d85e41e89ed5 src/java.base/share/classes/java/lang/Module.java
--- a/src/java.base/share/classes/java/lang/Module.java Thu Jun 11 07:27:22 2020 +0100
+++ b/src/java.base/share/classes/java/lang/Module.java Mon Dec 21 21:23:47 2020 +0100
@@ -42,6 +42,7 @@
import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
diff -r d85e41e89ed5 src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java Thu Jun 11 07:27:22 2020 +0100
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java Mon Dec 21 21:23:47 2020 +0100
@@ -184,7 +184,7 @@
* module-info.class format.
*/
public static byte[] toBytes(ModuleDescriptor descriptor) {
- return toModuleInfo(descriptor, null, null);
+ return toModuleInfo(descriptor, null);
}
/**
Please review.
Best regards,
Martin
More information about the jdk-updates-dev
mailing list