RFR: 8280798: com.sun.jdi.ObjectReference::setValue spec should prohibit any final field modification
Alan Bateman
alanb at openjdk.org
Mon Nov 28 09:47:12 UTC 2022
On Mon, 21 Nov 2022 22:58:54 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> com.sun.jdi.ObjectReference::setValue spec says that final static fields cannot be modified, but openjdk implementation throws IllegalArgumentException for any final fields (static or instance).
>
> The fix updates the spec to prohibit any final field modification
> CSR: JDK-8281652
I checked with the Microsoft team that maintain the Java Debugger in VS Code. The JDI implementation comes from the Eclipse JDT project. The summary is that the VS Code debugger doesn't allow final fields to be modified. It checks if the field is final so it won't call ObjectReference::setValue for final fields.
-------------
PR: https://git.openjdk.org/jdk/pull/11279
More information about the serviceability-dev
mailing list