-
Enhancement
-
Resolution: Fixed
-
P3
-
11, 17, 21, 22
-
b08
When VarHandle::set is called on a final field, the current implementation throws UOE with no exception message.
java.lang.UnsupportedOperationException
at java.base/java.lang.invoke.VarForm.getMemberName(VarForm.java:92)
at java.base/java.lang.invoke.VarHandle.getMethodHandleUncached(VarHandle.java:1986)
at java.base/java.lang.invoke.VarHandle.getMethodHandle(VarHandle.java:1979)
at java.base/java.lang.invoke.Invokers.checkVarHandleExactType(Invokers.java:465)
at VarHandles.setter(VarHandles.java:84)
at VarHandles.main(VarHandles.java:56)
Also Remi reports this: https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072500.html
java.lang.UnsupportedOperationException
at java.base/java.lang.invoke.VarForm.getMemberName(VarForm.java:92)
at java.base/java.lang.invoke.VarHandle.getMethodHandleUncached(VarHandle.java:1986)
at java.base/java.lang.invoke.VarHandle.getMethodHandle(VarHandle.java:1979)
at java.base/java.lang.invoke.Invokers.checkVarHandleExactType(Invokers.java:465)
at VarHandles.setter(VarHandles.java:84)
at VarHandles.main(VarHandles.java:56)
Also Remi reports this: https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072500.html