Skip to content

Reorder 'static' and 'final' modifiers #2640

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

thachlp
Copy link
Contributor

@thachlp thachlp commented Jul 14, 2023

Fix missorted modifiers 'final static'.

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Fix missorted modifiers 'final static'.
@pivotal-cla
Copy link

@thachlp Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 14, 2023
@pivotal-cla
Copy link

@thachlp Thank you for signing the Contributor License Agreement!

@mp911de mp911de self-assigned this Jul 17, 2023
jxblum pushed a commit to jxblum/spring-data-redis that referenced this pull request Jul 17, 2023
Per the Java Language Specification (Java 17; https://docs.oracle.com/javase/specs/jls/se17/html/jls-8.html#jls-8.3.1), 'static' should appear before 'final'.

This is also consistent with source code analysis tools, like Checkstyle, rules: https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.html.

See spring-projects#2640
jxblum added a commit to jxblum/spring-data-redis that referenced this pull request Jul 17, 2023
Additionally, applied Java 17 syntax, cleaned up compiler warnings, and edited Javadoc.

Closes spring-projects#2644
Original pull request: spring-projects#2640
@jxblum jxblum self-assigned this Jul 17, 2023
@jxblum jxblum added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 17, 2023
@jxblum jxblum changed the title Cleanup Reorder 'static' and 'final' modifiers Jul 17, 2023
jxblum added a commit to jxblum/spring-data-redis that referenced this pull request Jul 17, 2023
Additionally, applied Java 17 syntax, cleaned up compiler warnings, and edited Javadoc.

Closes spring-projects#2644
Original pull request: spring-projects#2640
mp911de pushed a commit that referenced this pull request Jul 18, 2023
Per the Java Language Specification (Java 17; https://docs.oracle.com/javase/specs/jls/se17/html/jls-8.html#jls-8.3.1), 'static' should appear before 'final'.

This is also consistent with source code analysis tools, like Checkstyle, rules: https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.html.

Original pull request: #2640
mp911de pushed a commit that referenced this pull request Jul 18, 2023
Additionally, applied Java 17 syntax, cleaned up compiler warnings, and edited Javadoc.

Closes #2644
Original pull request: #2640
mp911de added a commit that referenced this pull request Jul 18, 2023
Make fields final where possible. Reintroduce end of line comment markers to avoid reformatting into unreadable format. Replace HashSet per command instance with String to reduce memory footprint.

Tweak Javadoc wording to represent what we actually expect. Reorder methods.

See #2640
Original pull request: #2644
mp911de pushed a commit that referenced this pull request Jul 18, 2023
Per the Java Language Specification (Java 17; https://docs.oracle.com/javase/specs/jls/se17/html/jls-8.html#jls-8.3.1), 'static' should appear before 'final'.

This is also consistent with source code analysis tools, like Checkstyle, rules: https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.html.

Original pull request: #2640
mp911de pushed a commit that referenced this pull request Jul 18, 2023
Additionally, applied Java 17 syntax, cleaned up compiler warnings, and edited Javadoc.

Closes #2644
Original pull request: #2640
mp911de added a commit that referenced this pull request Jul 18, 2023
Make fields final where possible. Reintroduce end of line comment markers to avoid reformatting into unreadable format. Replace HashSet per command instance with String to reduce memory footprint.

Tweak Javadoc wording to represent what we actually expect. Reorder methods.

See #2640
Original pull request: #2644
mp911de pushed a commit that referenced this pull request Jul 18, 2023
Per the Java Language Specification (Java 17; https://docs.oracle.com/javase/specs/jls/se17/html/jls-8.html#jls-8.3.1), 'static' should appear before 'final'.

This is also consistent with source code analysis tools, like Checkstyle, rules: https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.html.

Original pull request: #2640
mp911de pushed a commit that referenced this pull request Jul 18, 2023
Additionally, applied Java 17 syntax, cleaned up compiler warnings, and edited Javadoc.

Closes #2644
Original pull request: #2640
mp911de added a commit that referenced this pull request Jul 18, 2023
Make fields final where possible. Reintroduce end of line comment markers to avoid reformatting into unreadable format. Replace HashSet per command instance with String to reduce memory footprint.

Tweak Javadoc wording to represent what we actually expect. Reorder methods.

See #2640
Original pull request: #2644
@mp911de mp911de added this to the 3.0.9 (2022.0.9) milestone Jul 18, 2023
@mp911de
Copy link
Member

mp911de commented Jul 18, 2023

Thank you for your contribution. That's merged, polished, and backported now. We indeed try to follow a consistent scheme.

@mp911de mp911de closed this Jul 18, 2023
@thachlp thachlp deleted the clean-code branch January 25, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants