Spring Batch uses JSpecify annotations for null safety.
Some @Nullable annotations are not placed immediately before the annotated type, as recommended by the Spring Framework reference documentation.
Examples from the current main branch:
The recommended placement is:
public static @Nullable Duration calculateDuration(...);
private final @Nullable String message;
default @Nullable JobInstance getJobInstance(...);
see also: https://github.com/spring-projects/spring-framework/wiki/Code-Style#null-safety-of-apis-and-fields
Spring Batch uses JSpecify annotations for null safety.
Some
@Nullableannotations are not placed immediately before the annotated type, as recommended by the Spring Framework reference documentation.Examples from the current
mainbranch:@Nullable public static Durationprivate @Nullable final String@Nullable default JobInstanceThe recommended placement is:
see also: https://github.com/spring-projects/spring-framework/wiki/Code-Style#null-safety-of-apis-and-fields