[lworld] RFR: 8377171: [lworld] Comment warnings for internal valhalla annotations

Frederic Parain fparain at openjdk.org
Wed Feb 4 18:52:50 UTC 2026


On Tue, 3 Feb 2026 15:20:07 GMT, Chen Liang <liach at openjdk.org> wrote:

> Add some warning comments for value-related annotations in jdk.internal, to discourage their misuse.

src/java.base/share/classes/jdk/internal/vm/annotation/LooselyConsistentValue.java line 52:

> 50:  * <p>
> 51:  * This annotation is only recognized on classes from the boot and platform
> 52:  * class loaders and is ignored elsewhere.

There's no such restriction in the current implementation.

src/java.base/share/classes/jdk/internal/vm/annotation/NullRestricted.java line 53:

> 51:  * <p>
> 52:  * This annotation is only recognized on classes from the boot and platform
> 53:  * class loaders and is ignored elsewhere.

There's no such restriction in the current implementation.

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/2023#discussion_r2765506920
PR Review Comment: https://git.openjdk.org/valhalla/pull/2023#discussion_r2765507477


More information about the valhalla-dev mailing list