RFR: 8298875: A module requiring "java.base" with flags ACC_SYNTHETIC should be rejected

Alan Bateman alanb at openjdk.org
Mon Dec 19 07:52:18 UTC 2022


A small oversight with ModuleDescriptor.read when checking the requires table of a Module attribute. The requires entry for java.base should not have ACC_SYNTHETIC set.

A new test is added. Some of the existing tests used `@Test(expectedExceptions=...)`. I've changed some of these to use assertThrows to narrow it down to method that is expected to throw.

-------------

Commit messages:
 - Initial commit

Changes: https://git.openjdk.org/jdk/pull/11714/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11714&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8298875
  Stats: 75 lines in 2 files changed: 34 ins; 17 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/11714.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11714/head:pull/11714

PR: https://git.openjdk.org/jdk/pull/11714


More information about the core-libs-dev mailing list