RFR: 8285364: Remove REF_ enum for java.lang.ref.Reference [v9]
Kim Barrett
kbarrett at openjdk.org
Tue Jun 28 00:54:06 UTC 2022
On Mon, 27 Jun 2022 22:19:35 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Simple rename and some comments update.
>>
>> Test: build
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> review
Looks good.
Just a couple of minor "naming" comments, that you can address or not.
src/hotspot/share/classfile/classFileParser.cpp line 6115:
> 6113: // j.l.r.Reference cannot be instantiated so doesn't partake in
> 6114: // ref-processing.
> 6115: return is_java_lang_ref_Reference_subclass();
This seems to be the only call to this function, so the definition could just be inlined here and drop the separate function.
src/hotspot/share/classfile/classFileParser.hpp line 566:
> 564:
> 565: bool is_instance_ref_klass() const;
> 566: ReferenceType determine_reference_type() const;
I'd prefer this was just called `reference_type`. Like much of the API here, this is about a property of the designated klass. That it's no longer just a data member accessor is of no particular importance.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.org/jdk/pull/8332
More information about the serviceability-dev
mailing list