RFR: 8309979: BootstrapMethods attribute is missing in class files recreated by SA

Chris Plummer cjplummer at openjdk.org
Thu Jun 15 18:24:58 UTC 2023


On Thu, 15 Jun 2023 15:06:54 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

> Please review this PR that extends SA to write BootstrapMethods attribute when dumping the class files.

Changes requested by cjplummer (Reviewer).

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstantPool.java line 498:

> 496:     U2Array operands = getOperands();
> 497:     if (operands == null)  return null;  // safety first
> 498:     int basePos = getOperandOffsetAt(bsmIndex);

Maybe you should pass `operands` into `getOperandOffsetAt()` so it does not need to be fetched again.

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java line 694:

> 692:         if (bsmCount != 0)
> 693:             classAttributeCount++;
> 694: 

Please use curly braces here.

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

PR Review: https://git.openjdk.org/jdk/pull/14495#pullrequestreview-1482155574
PR Review Comment: https://git.openjdk.org/jdk/pull/14495#discussion_r1231384753
PR Review Comment: https://git.openjdk.org/jdk/pull/14495#discussion_r1231388162


More information about the serviceability-dev mailing list