On Tue, 2 Sep 2025 11:43:01 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> src/hotspot/share/oops/instanceKlass.hpp line 924: >> >>> 922: // always an InstanceKlass (or nullptr) >>> 923: InstanceKlass* super() const { >>> 924: return (Klass::super() == nullptr) ? nullptr : >>> InstanceKlass::cast(Klass::super()); >> >> Is it better/simpler/cleaner to just do: >> >> return static_cast<InstanceKlass*>(Klass::super()); >> >> ? > > I think the term is "hides" not "shadows". InstanceKlass::cast() is better - > one additional check that super is always another InstanceKlass. Do we still need java_super ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27037#discussion_r2315827420