diff --git a/checker/src/main/java/org/checkerframework/checker/initialization/InitializationChecker.java b/checker/src/main/java/org/checkerframework/checker/initialization/InitializationChecker.java index 477ccba52b8..9faed6e19b8 100644 --- a/checker/src/main/java/org/checkerframework/checker/initialization/InitializationChecker.java +++ b/checker/src/main/java/org/checkerframework/checker/initialization/InitializationChecker.java @@ -23,9 +23,10 @@ protected InitializationChecker() {} @Override public SortedSet<String> getSuppressWarningsPrefixes() { SortedSet<String> result = super.getSuppressWarningsPrefixes(); - // The SuppressesWarnings string "initialization" is not useful here: it suppresses *all* - // warnings, not just those related to initialization. Instead, if the user writes - // @SuppressWarnings("initialization"), let that match keys containing that string. + // "fbc" is for backward compatibility only. Note that the SuppressesWarnings strings + // "initialization" and "fbc" suppress *all* warnings, not just those related to + // initialization. See manual section + // https://checkerframework.org/manual/#initialization-checking-suppressing-warnings . result.add("fbc"); return result; } diff --git a/docs/manual/nullness-checker.tex b/docs/manual/nullness-checker.tex index cc4c7a2d3f5..eee0a84317a 100644 --- a/docs/manual/nullness-checker.tex +++ b/docs/manual/nullness-checker.tex @@ -2018,11 +2018,11 @@ \subsectionAndLabel{Suppressing warnings}{initialization-checking-suppressing-warnings} To suppress most warnings related to partially-initialized values, use the -warning suppression string ``initialization.''~(note the trailing period) -or ``fbc''. You can write \<@SuppressWarnings("initialization.")> or -\<@SuppressWarnings("fbc")> on a field, constructor, or +warning suppression string ``initialization.''~(note the trailing period). +You can write \<@SuppressWarnings("initialization.")> +on a field, constructor, or class, or pass the command-line argument -\<-AsuppressWarnings=initialization.>~or \<-AsuppressWarnings=fbc> when +\<-AsuppressWarnings=initialization.> when running the Nullness Checker. (For more about suppressing warnings, see \chapterpageref{suppressing-warnings}). You will no longer get a guarantee @@ -2087,7 +2087,7 @@ % LocalWords: typeofthis nraB nrbB rO nroO nroB containsKey enum NullAway % LocalWords: JUnit's field1 field2 superclasses Foo C1 C2 PolyRaw type'' % LocalWords: NullnessChecker redundantNullComparison instanceof runtime -% LocalWords: noInitForMonotonicNonNull UnknownInitialization isArray fbc +% LocalWords: noInitForMonotonicNonNull UnknownInitialization isArray % LocalWords: UnderInitialization getComponentType AsuppressWarnings % LocalWords: isEmpty AssumeAssertion cleanroom varargs OtherClass Astubs % LocalWords: mymap mykey KeyType ValueType lineSeparator receiver''