RFR: 8349405: Redundant and confusing null checks on data from CP::resolved_klasses [v2]

Coleen Phillimore coleenp at openjdk.org
Wed Apr 16 18:23:26 UTC 2025


> This small cleanup asserts that when we have JVM_CONSTANT_Class tag in the constant pool, the resolved_klasses() contains a non-null Klass.  There were some null checks left over and access to resolved_klasses() should go through resolved_klass_at() whenever possible to hide the CPSlot code.
> Tested with tier1-8.

Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:

  Move comment to above the lines it describes.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24665/files
  - new: https://git.openjdk.org/jdk/pull/24665/files/eb46b83f..13874930

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24665&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24665&range=00-01

  Stats: 4 lines in 1 file changed: 2 ins; 2 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/24665.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24665/head:pull/24665

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


More information about the hotspot-dev mailing list