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

Improve documentation by link getUpstreamCheckerNames and getSuppressWarningsPrefixes #1016

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ public InitializationChecker() {}
/**
* Also handle {@code AnnotatedFor} annotations for this checker. See {@link
* InitializationFieldAccessSubchecker#getUpstreamCheckerNames()} and the two implementations
* should be kept in sync.
* should be kept in sync. The name of this checker is also added in {@link
* #getSuppressWarningsPrefixes()}.
*
* @return the list of checkers that should be run before this checker
*/
@Override
public List<@FullyQualifiedName String> getUpstreamCheckerNames() {
Expand All @@ -102,6 +105,13 @@ public InitializationChecker() {}
return upstreamCheckerNames;
}

/**
* Manually add the default prefix "initialization" to the set of prefixes that can be used to
* suppress warnings. The checker is also added in {@link #getUpstreamCheckerNames()} for
* AnnotatedFor annotations to be recognized by this checker.
*
* @return the set of prefixes that can be used to suppress warnings
*/
@Override
public NavigableSet<String> getSuppressWarningsPrefixes() {
NavigableSet<String> result = super.getSuppressWarningsPrefixes();
Expand Down
Loading