On Tue, 9 Jun 2026 12:07:14 GMT, Serguei Spitsyn <[email protected]> wrote:

>> fixed. explicitly set the missing capability to false for all 23 affected 
>> files to match the old manifests: basicAgent gets both false, redefineAgent 
>> gets Can-Retransform-Classes:false, retransformAgent gets 
>> Can-Redefine-Classes:false, RedefineClassesDisabledTest gets 
>> Can-Retransform-Classes:false. all 80 tests pass.
>> 
>> Q1: VerifyLocalVariableTableOnRetransformTest (which depends on LVT) passes 
>> on all 4 platforms. the only test that explicitly needs -g is 
>> RetransformWithMethodParametersTest which already has @run compile -g 
>> -parameters.
>> 
>> Q2: I think CompilerUtils doesn’t carry these over. will check with @lmesnik
>
>> fixed. explicitly set the missing capability to false for all 23 affected 
>> files to match the old manifests
> 
> In fact, I don't like this solution. It is not a good idea to pass 
> explicitly: `Can-Retransform-Classes:false` etc.
> If the `Can-Retransform-Classes:true` was not passed then the manifest 
> attribute should not be set at all.

Hmm I think we can do two things. Just revert the explicit false additions 
(tests still pass with extra capabilities), or do you want me to also change 
JavaAgentBuilder to not default Can-Redefine/Retransform and update all 
callers? the second approach is cleaner but touches around 35 files outside 
instrument/

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31288#discussion_r3382010113

Reply via email to