Skip to content

Align @Nullable annotation placement with Spring code style #5525

Open

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

  1. added 2 commits that reference this issue on Sep 10, 2026
    2385a53
    1de5e71
  2. added 2 commits that reference this issue on Oct 7, 2026
    e9a6aee
    fe263d5
  3. added a commit that references this issue on Oct 19, 2026
    3a3dbe9
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