Skip to content

@Nullable Formatting Causes Checkstyle Failures #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ryanjbaxter opened this issue May 15, 2025 · 0 comments
Closed

@Nullable Formatting Causes Checkstyle Failures #440

ryanjbaxter opened this issue May 15, 2025 · 0 comments
Milestone

Comments

@ryanjbaxter
Copy link

ryanjbaxter commented May 15, 2025

I upgraded to spring-javaformat 0.44 today and it is causing some checkstyle failures after applying the formatting. It looks like there was a change in the way we deal with org.springframework.lang.Nullable, see #435

@Override
@Nullable
public BeanResolver getBeanResolver() {
    return this.beanFactoryResolver;
}

Now gets transformed to

@Override
@Nullable public BeanResolver getBeanResolver() {
    return this.beanFactoryResolver;
}

And then the Checkstyle check fails with Annotation 'Nullable' should be alone on line.

@snicoll snicoll added this to the 0.0.45 milestone May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants