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

Alan Bateman alanb at openjdk.org
Tue Sep 30 08:24:14 UTC 2025


On Mon, 29 Sep 2025 18:35:29 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/modules/m1/p1/Mutator.java line 36:
> 
>> 34:     void setInt(Field f, Object obj, short value) throws IllegalAccessException;
>> 35:     void setInt(Field f, Object obj, int value) throws IllegalAccessException;
>> 36:     void setLong(Field f, Object obj, long value) throws IllegalAccessException;
> 
> Is
> 
>      void setInt(..., short value)
> 
> used at all? If so,
> 
> 1. Where?
> 2. Do we also need the following?
> 
>        setLong(..., short value)
>        setLong(..., int value)
>        setDouble(..., float value)

Well spotted, there should be only one setInt method in this interface, the setInt(... short) method is not used.

(The test is cross-module access checking so is not concerned with conversions).

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

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


More information about the core-libs-dev mailing list