On Wed, 24 Jun 2026 13:51:00 GMT, Chen Liang <[email protected]> wrote:

>> src/java.base/share/classes/java/lang/invoke/ArrayVarHandle.java line 44:
>> 
>>> 42: /// This var handle must check each incoming array instance to 
>>> determine the
>>> 43: /// layout and the correct operation for that array.
>>> 44: final class ArrayVarHandle extends VarHandle {
>> 
>> Given the repetition of logic, and the risk of missing some change down the 
>> line, at what point do we consider using a template to generate this file?
>
> I think if that's the case, we should update all X-VarHandleXxx.java.template 
> templates to be similarly generaetd. Even though they are templates, they do 
> feature a lot of duplications. And given they are preexisting, I think this 
> is better handled in mainline.

Created https://bugs.openjdk.org/browse/JDK-8387216 to track this effort.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2576#discussion_r3467678589

Reply via email to