Skip to content

Remove redundant value from illegalClasses for IllegalImportCheck #35195

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
wants to merge 1 commit into from

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Jul 13, 2025

Overview

This PR removes redundant value from illegalClasses for IllegalImportCheck as it seems to be covered by ^(?!org\.jspecify|\.annotations).*(NonNull|Nullable) already.

Related Issues

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 13, 2025
@sbrannen sbrannen self-assigned this Jul 14, 2025
@sbrannen sbrannen added the type: task A general task label Jul 14, 2025
@sbrannen sbrannen changed the title Remove redundant value from illegalClasses for IllegalImportCheck Remove redundant value from illegalClasses for IllegalImportCheck Jul 14, 2025
@sbrannen sbrannen marked this pull request as draft July 15, 2025 13:54
sbrannen added a commit that referenced this pull request Jul 15, 2025
sbrannen added a commit that referenced this pull request Jul 15, 2025
While assessing #35195, I noticed the following issues with our
Checkstyle configuration regarding nullability annotations.

- "^(?!org\.jspecify|\.annotations).*(NonNull|Nullable)$" contains a "|".

- "^(?!org\.jspecify|\.annotations).*(NonNull|Nullable)$" matches against
  NonNull but not against Nonnull, and therefore incorrectly permits
  usage of javax.annotation.Nonnull.

- Some of the Checkstyle suppressions no longer apply.

This commit addresses all of the above issues and updates several tests
to use example annotations other than javax.annotation.Nonnull where
feasible.

See gh-35195
Closes gh-35205
@sbrannen
Copy link
Member

sbrannen commented Jul 15, 2025

Well spotted, @izeye. 👍

However, since that change was introduced in conjunction with #35114, which is assigned to 7.0 M7, which has not yet been released, I simply decided to revert that particular commit (see aac61b8).

In light of that, I am closing this PR.

In addition, I noticed other issues with our Checkstyle rules which I addressed in 4fdf40e.

Cheers,

Sam

@sbrannen sbrannen closed this Jul 15, 2025
@sbrannen sbrannen added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants