On Thu, 17 Jul 2025 01:57:32 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> The VM option -XX:AllowRedefinitionToAddDeleteMethods was added in JDK 13 as 
>> a temporary backward compatibility flag under JDK-8192936 and was 
>> immediately marked as Deprecate. The fix is to obsolete this option in JDK 
>> 26 and expire in JDK 27.
>> 
>> TBD: Need to submit a related CSR.
>> 
>> There are two concerns which may require some negotiation with the Runtime 
>> (@coleenp @dcubed-ojdk @dholmes-ora) and SQE (@lmesnik) teams:
>>  - Class redefinition/retransformation can impact lambda expressions which 
>> are supported with private methods
>>  - Many tests depend on this VM option and are being removed. I'm not sure 
>> if it is okay to completely remove those e may want another way to handle 
>> this (e.g. problem-listing the impacted tests for now).
>>  
>> Testing:
>>  - mach5 tiers 1-6 are good
>>  - may need to run mach5 tiers > 6
>
> Serguei Spitsyn has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains six additional 
> commits since the last revision:
> 
>  - Merge
>  - Merge
>  - review: replace RESERVED flag with UNUSED
>  - review: keep right order of the obsoleted VM options
>  - corrected one assert message
>  - 8358890: VM option -XX:AllowRedefinitionToAddDeleteMethods should be 
> obsoleted then expired

I commented the only test that seems to be still useful. 
All other tests are related to add/delete methods.
I think it is needed to check if any of remaining tests should be updated to 
negative tests that verifies correctness of thrown Exception. 
However, it could be done after final agreement is reached.

test/jdk/java/lang/instrument/RedefineMethodInBacktrace.sh line 2:

> 1: #
> 2: # Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights 
> reserved.

This test is still useful, it is needed to remove method deletion only. 
However, part of testing with redefined method is still useful. 
The test checks that old copy of redefined method is not removed.

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

Changes requested by lmesnik (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26232#pullrequestreview-3027590373
PR Review Comment: https://git.openjdk.org/jdk/pull/26232#discussion_r2212081642

Reply via email to