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 PICO annotation #106

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open

Add PICO annotation #106

wants to merge 57 commits into from

Conversation

Ao-senXiong
Copy link
Member

No description provided.

Copy link
Member

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

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

You also need to add the new qualifier package to module-info.java.

src/java.base/share/classes/java/io/File.java Show resolved Hide resolved
@@ -162,7 +165,8 @@
"EnsuresNonNullIf(expression={\"list()\",\"list(FilenameFilter)\",\"listFiles()\",\"listFiles(FilenameFilter)\",\"listFiles(FileFilter)\"}, result=true)\""
})
@AnnotatedFor({"index", "initialization", "interning", "lock", "nullness"})
public class File
@DefaultQualifierForUse(Readonly.class)
Copy link
Member

Choose a reason for hiding this comment

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

Should all files have this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am still thinking. At least for most usage in @RDM class, this make sense because we need to make the most method can be used for both @Immutable and @Mutable class like getters. Some methods can only be used by @Mutable receiver like add(...).

I am wondering should we default the defaultqualifierforuse to RDM for RDM class?

@Ao-senXiong
Copy link
Member Author

You also need to add the new qualifier package to module-info.java.

Done, thanks!

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