On Tue, 11 Jul 2023 06:32:24 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:
>> Ashutosh Mehra has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Some code motion and factoring out common code >> >> Signed-off-by: Ashutosh Mehra <asme...@redhat.com> > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstMethod.java > line 494: > >> 492: offset += 1; >> 493: } >> 494: Address addr = getAddress().getAddressAt((getSize() - offset) * >> VM.getVM().getAddressSize()); > > Factor this address calculation out, and as @plummercj remarked, comment it? Done. > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java > line 874: > >> 872: return null; >> 873: } >> 874: } > > Would calling these functions even be valid to call if Annotations are not > present? > > If yes, maybe return Optional? But since the rest of the code does not use > Optional either, maybe rather keep the code the same. > > Up to you, feel free to ignore this. I would keep it as is following existing code pattern. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14735#discussion_r1260208546 PR Review Comment: https://git.openjdk.org/jdk/pull/14735#discussion_r1260209779