On 4/24/19 11:51 AM, Frank Yuan wrote: > My test code is as below: > ... > final VarHandle vhf; > final VarHandle vhvf; > ...
Make these two "static final", initialize them in class initializer, then try again. VarHandle (like Atomic*FieldUpdaters, MethodHandle, etc), have internal checks that can only be folded away when the VH/MH/A*FU instance is constant. -Aleksey
