RFR: 8365858: FilteredJavaFieldStream is unnecessary

Paul Hübner phubner at openjdk.org
Fri Sep 12 11:36:32 UTC 2025


Hi all,

`FilteredJavaFieldStream` purely exists to hide the field `constantPoolOop` in `jdk.internal.reflect.ConstantPool`. This PR:
1) refactors `constantPoolOop` to be a hidden VM injected field `vmtarget` (name to be consistent with other similar cases),
2) removes `FilteredJavaFieldStream` entirely, and
3) updates code previously relying on `FilteredJavaFieldStream` to use `JavaFieldStream` instead.

Testing: Oracle tiers 1-3.

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

Commit messages:
 - Fix typo.
 - Refactor to purely use injected fields.
 - Remove FilteredJavaFieldStream and usages.
 - Remove constantPoolOop from Java code.
 - Make constantPoolOop a hidden vmholder field.

Changes: https://git.openjdk.org/jdk/pull/27209/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27209&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365858
  Stats: 194 lines in 9 files changed: 8 ins; 166 del; 20 mod
  Patch: https://git.openjdk.org/jdk/pull/27209.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27209/head:pull/27209

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


More information about the core-libs-dev mailing list