Skip to main content

NullAway readiness scorecard

io.moderne.nullability.search.NullAwayReadinessReport

Produces a per-class readiness scorecard for a NullAway rollout as a data table, without modifying any source. For every Java class (top-level and nested) it counts the methods, fields, and parameters that already carry a @Nullable annotation, the instance fields that are non-null but uninitialized (the residual field-initialization risk NullAway flags once a scope is marked), and whether the class or its enclosing package-info is already @NullMarked. A consumer can use these numbers to compute annotation coverage and weigh it against field-init risk, then prioritize which packages or modules to mark @NullMarked first. This is a triage report, not a transformation: the recipe emits no source changes.

Recipe source

This recipe is only available to users of Moderne.

This recipe is available under the Moderne Proprietary License.

Usage

This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe NullAwayReadinessReport

If the recipe is not available locally, then you can install it using:

mod config recipes jar install io.moderne.recipe:rewrite-nullability:0.1.0

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

NullAway readiness report

io.moderne.nullability.search.NullAwayReadinessReport$ReadinessReport

A per-class scorecard of @Nullable/@NullMarked coverage and uninitialized non-null field risk, used to prioritize the order in which packages are marked @NullMarked.

Column NameDescription
Source pathThe path of the source file the class was declared in.
Package nameThe package the class belongs to (empty for the default package).
Class nameThe fully qualified name of the class (or its simple name when the type is unresolved).
Method countThe number of non-constructor methods declared directly in the class.
Nullable-annotated method countThe number of methods whose return type already carries a @Nullable annotation.
Field countThe number of fields (named variables) declared directly in the class.
Nullable-annotated field countThe number of fields that already carry a @Nullable annotation.
Uninitialized non-null field countThe number of instance reference fields that are non-@Nullable, non-final, have no initializer, and are not unconditionally assigned in every constructor. This is the residual field-initialization risk NullAway flags once the scope is @NullMarked.
Parameter countThe total number of method and constructor parameters declared in the class.
Nullable-annotated parameter countThe number of parameters that already carry a @Nullable annotation.
Already null-markedTrue if the class itself, or its enclosing package-info, carries @NullMarked.