Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ValueType annotation in preparation for Valhalla #57

Closed
TheMode opened this issue Jul 29, 2021 · 3 comments
Closed

@ValueType annotation in preparation for Valhalla #57

TheMode opened this issue Jul 29, 2021 · 3 comments

Comments

@TheMode
Copy link

TheMode commented Jul 29, 2021

A new annotation giving a warning when an instance is used as a monitor. As specified in PrimitiveObject documentation https://github.com/openjdk/valhalla/blob/lworld/src/java.base/share/classes/java/lang/PrimitiveObject.java#L51

It could also be used to discourage users from using the object monitor directly (in the case where it is used internally)

@amaembo
Copy link
Collaborator

amaembo commented Aug 2, 2021

There's already @jdk.internal.ValueBased annotation that is used in JDK for this purpose.

@amaembo amaembo closed this as completed Aug 2, 2021
@TheMode
Copy link
Author

TheMode commented Aug 2, 2021

As the name indicates, isn't it strictly internal?

@amaembo
Copy link
Collaborator

amaembo commented Aug 3, 2021

Yes, currently it is. But this may change in the future, and we don't want to repeat JDK annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants