[lworld] RFR: 8375074: [lworld] vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe001/TestDescription.java fails with --enable-preview
Alex Menkov
amenkov at openjdk.org
Tue Jan 27 18:12:42 UTC 2026
On Tue, 27 Jan 2026 01:47:16 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> The test verifies that ModificationWatchpointEvent have different current and new values.
>> Debuggee sets different primitive values (like `Byte.MIN_VALUE/Byte.MAX_VALUE`), but for wrapper classes it assumes that `new Byte(Byte.MIN_VALUE) != new Byte(Byte.MIN_VALUE)`, which is wrong with `--enable-preview`
>
> test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe001a.java line 206:
>
>> 204: X1 = new Class[] {X0};
>> 205: X2 = new Class[][] {X1};
>> 206: Z0 = new Boolean(z0);
>
> I understand your description of the problem, but I don't understand how changes like this are fixing the issue. z0 == true, so how is this any different than Boolean(true)?
`initFields()` is called twice - from `init()` and from `run()`
`init()` sets z0 = false, `run()` sets z0 = true
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1977#discussion_r2733240249
More information about the valhalla-dev
mailing list