Class NullnessChecker

All Implemented Interfaces:
Processor, OptionConfiguration

@SupportedLintOptions({"noInitForMonotonicNonNull","redundantNullComparison","soundArrayCreationNullness","forbidnonnullarraycomponents","trustArrayLenZero","permitClearProperty"}) @SupportedOptions({"assumeKeyFor","assumeInitialized","jspecifyNullMarkedAlias","conservativeArgumentNullnessAfterInvocation"}) public class NullnessChecker extends InitializationChecker
An implementation of the nullness type-system, parameterized by an initialization type-system for safe initialization. It uses freedom-before-commitment, augmented by type frames (which are crucial to obtain acceptable precision), as its initialization type system.

This checker uses the NullnessNoInitSubchecker to check for nullness and extends the InitializationChecker to also check that all non-null fields are properly initialized.

You can use the following SuppressWarnings prefixes with this checker:

  • @SuppressWarnings("nullness") suppresses warnings for both nullness and initialization annotations
  • @SuppressWarnings("initialization") suppresses warnings for initialization annotations only
  • @SuppressWarnings("nullnessnoinit") suppresses warnings for nullness annotations only
See Also:
See the Checker Framework Manual:
Nullness Checker