RFR: 8353835: Implement JEP 500: Prepare to Make Final Mean Final [v4]

Alan Bateman alanb at openjdk.org
Tue Sep 30 12:40:47 UTC 2025


On Mon, 29 Sep 2025 10:08:58 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   RemoveFields(duration) and filter internal frames
>
> test/jdk/java/lang/reflect/Field/mutateFinals/jar/ExecutableJarTest.java line 110:
> 
>> 108:      */
>> 109:     @Test
>> 110:     void testFieldSetWithAddOpens1() throws Exception {
> 
> Suggestion:
> 
>      * with the Add-Opens attribute.

This test uses --add-opens rather than the JAR file Add-Opens attributes so I think the comment is okay.

> test/jdk/java/lang/reflect/Field/mutateFinals/jar/ExecutableJarTest.java line 129:
> 
>> 127:     void testFieldSetWithAddOpens2() throws Exception {
>> 128:         String jarFile = createExecutableJar(Map.of(
>> 129:                 "Enable-Final-Field-Mutation", "ALL-UNNAMED",
> 
> Instead of `BadValue`, shall we use a valid module name here to stress the following specification from the JEP:
> 
>> The only supported value for the `Enable-Final-Field-Mutation`
>> manifest entry is `ALL-UNNAMED`; other values cause an
>> exception to be thrown.

Okay, we can use a ValueSource here to have it test with a module name and other random strings.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25115#discussion_r2391269150
PR Review Comment: https://git.openjdk.org/jdk/pull/25115#discussion_r2391260982


More information about the core-libs-dev mailing list