RFR: 8240908: RetransformClass does not know about MethodParameters attribute [v2]

Serguei Spitsyn sspitsyn at openjdk.java.net
Wed Jan 26 07:29:41 UTC 2022


On Mon, 24 Jan 2022 10:40:44 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> Changes:
>> - ClassFileReconstituter is updated to restore "MethodParameters" attribute;
>> - handling of the attribute in VM_RedefineClasses is moved to be consistent with other code (like local variable table);
>> - copied ClassTransformer class (from test/jdk/com/sun/jdi/lib/jdb) to /test/lib as it's used by tests from hotspot and jdk (and also by test from Valhalla repo); Will file a follow up issues to updates tests and remove the class from test/jdk/com/sun/jdi/lib/jdb
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed condition

test/jdk/java/lang/instrument/RetransformWithMethodParametersTest.java line 54:

> 52: import jdk.test.lib.util.ClassTransformer;
> 53: 
> 54: class MethodParametersTarget {

The test has a lack of comments, so it is not easy to read and understand it.
Could you look at it and consider adding some comments where it makes sense to add?
For instance, some explanation is needed on how `@1` with tags `commentout` and `uncomment` are used.
It is not convenient to go deep into the `jdk.test.lib.util.ClassTransformer` to get such answers.
At least some comment should suggest to look at this class to save time of analysis.

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

PR: https://git.openjdk.java.net/jdk/pull/7180


More information about the serviceability-dev mailing list