RFR: 8334772: Change Class::protectionDomain and signers to explicit fields

Chen Liang liach at openjdk.org
Wed Jul 17 18:08:51 UTC 2024


Please review this change that moves `Class.protectionDomain` and `signers` to explicit fields.

Related native methods in `Class` and `AccessController::getProtectionDomain` are converted to pure Java. These fields are still set and used by hotspot. Also fixes the incorrect `protectiondomain_signature` in `vmSymbols`, which is actually an array descriptor.

Note that these new fields are not filtered: filtering in early bootstrap requires other unrelated adjustments as we can't even use hashCode on String, and filtering is not proper encapsulation either.

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

Commit messages:
 - Tests rely on Class ctor
 - Move class protectionDomain and signers fields to be explicit

Changes: https://git.openjdk.org/jdk/pull/20221/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20221&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8334772
  Stats: 145 lines in 15 files changed: 25 ins; 90 del; 30 mod
  Patch: https://git.openjdk.org/jdk/pull/20221.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20221/head:pull/20221

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


More information about the core-libs-dev mailing list