It would be nice if there was a rule that could be applied to checkstyle that would ensure that the code follows Spring's best practices for nullability.
- Only use
org.jspecify annotations
- The
org.jspecify annotations are immediately before the type (after modifiers like final, private, public) and on the same line as the type
This would be used in conjunction with RequireExplicitNullMarking (e.g. Enable RequireExplicitNullMarking checker #23) to ensure consistency across the Spring portfolio.
NOTE: I think that ideally this could be used in isolation to apply the nullability checkstyle rules so that teams (e.g. Spring Framework) not using other parts of spring-javaformat can still benefit.
It would be nice if there was a rule that could be applied to checkstyle that would ensure that the code follows Spring's best practices for nullability.
org.jspecifyannotationsorg.jspecifyannotations are immediately before the type (after modifiers like final, private, public) and on the same line as the typeThis would be used in conjunction with
RequireExplicitNullMarking(e.g. Enable RequireExplicitNullMarking checker #23) to ensure consistency across the Spring portfolio.NOTE: I think that ideally this could be used in isolation to apply the nullability checkstyle rules so that teams (e.g. Spring Framework) not using other parts of spring-javaformat can still benefit.