RFR: 8314165: [lw5] check for illegal circularity at class loading time

Vicente Romero vromero at openjdk.org
Fri Aug 11 22:31:29 UTC 2023


This PR is implementing this assertion of JEP 401:


At class load time, an error occurs if an ACC_DEFAULT class has an illegal circularity in its instance field types


which is in section: `class file representation & interpretation`

So for example if a Java compiler were able to create a class file for class:

value class Test {
    Test! test; // illegal circularity
    public implicit Test();
}

then javac should issue an error while loading such a class

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

Commit messages:
 - 8314165: [lw5] check for illegal circularity at class loading time

Changes: https://git.openjdk.org/valhalla/pull/903/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=903&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8314165
  Stats: 149 lines in 5 files changed: 143 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/valhalla/pull/903.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/903/head:pull/903

PR: https://git.openjdk.org/valhalla/pull/903



More information about the valhalla-dev mailing list