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

David Holmes dholmes at openjdk.org
Wed Apr 16 05:35:39 UTC 2025


On Tue, 15 Apr 2025 13:59:30 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> 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.

Okay I've convinced myself this seems reasonable.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24665#pullrequestreview-2770814201


More information about the hotspot-dev mailing list