Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
12.0
-
None
-
None
-
OpenJDK 11
Debian 10
KDE Plasma 5
Description
When stepping over multiple String assignment statements with a single variable, the values popup always shows only the first value assigned. It doesn't reflect any new assignments, so it becomes incorrect (and thus extremely misleading). The value in the variables table remains correct at all times, but for longer String values, the values popup is the only way to confirm the correct value.
To replicate (always):
public static void main(String[] args) { String s; s = "alpha"; s = "beta"; s = "gamma"; }
Add a breakpoint at the second assignment statement, then debug file. Use Step Over (keyboard or click) two times. In the Variables tab, the value of s will show "gamma" as expected in the table.
Now, click the "..." in the value column.
Expected: popup shows gamma value (correct value)
Actual: popup shows alpha value instead (wrong value!)
Note: If the breakpoint is set on the third assignment statement instead, and Step Over is used only once, the value of the popup will show beta value cached instead of alpha value, but still doesn't reflect correct gamma value.