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

add interning annotation to Object class #61

Closed
wants to merge 4 commits into from
Closed

add interning annotation to Object class #61

wants to merge 4 commits into from

Conversation

PRITI1999
Copy link

The class Object instances would be checked for equality using equals method of Object class. Therefore, Object class should be annotated as @UsesObjectEquals.

@@ -52,7 +53,7 @@
*/
@AnnotatedFor({"aliasing", "guieffect", "index", "lock", "nullness"})
@PolyUIType
public class Object {
public @UsesObjectEquals class Object {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Javadoc for @UsesObjectEquals says:

A class may be annotated @UsesObjectEquals if neither it, nor any of its supertypes or subtypes, overrides equals. Therefore, it cannot be written on Object itself.

@mernst mernst closed this Jul 26, 2020
Ao-senXiong pushed a commit to Ao-senXiong/jdkopprop that referenced this pull request Sep 8, 2023
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

Successfully merging this pull request may close these issues.

2 participants