On Mon, 22 Jun 2026 07:42:50 GMT, Alan Bateman <[email protected]> wrote:

>> Man Cao has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Use 'import static'
>
> src/java.base/share/classes/java/lang/Class.java line 96:
> 
>> 94: import sun.reflect.annotation.*;
>> 95: 
>> 96: import static 
>> jdk.internal.reflect.ReflectionFactory.getReflectionFactory;
> 
> The changes look okay although I don't particularly like this static import - 
> it's not at all obvious at the usages in Class that it gets it from 
> ReflectionFactory.

Thanks all for the reviews.

For static import, I'm OK with either way. It has the benefit of smaller 
bytecode, but a bit less readable for users without an IDE to navigate the 
source.

I can go either way if someone has a strong preference.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31591#discussion_r3450695797

Reply via email to