Skip to content

Align @Nullable annotation placement with Spring code style #5525

Description

@acktsap

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions