Skip to content
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

Upgrade checkstyle to version 7.5 #22960

Merged
merged 1 commit into from
Feb 3, 2017

Conversation

jasontedor
Copy link
Member

This commit upgrades the checkstyle configuration from version 5.9 to
version 7.5, the latest version as of today. The main enhancement
obtained via this upgrade is better detection of redundant modifiers.

This commit upgrades the checkstyle configuration from version 5.9 to
version 7.5, the latest version as of today. The main enhancement
obtained via this upgrade is better detection of redundant modifiers.
Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed over the changes and it LGTM.

For the record I copy a comment from @nik9000 that summarizes the changes:

  • public methods on non-public classes don't make sense. Remove the modifier and let the method inherit the modifier.
  • try-with-resources variables should not be declared final because they are implicitly final. final adds no extra information for the reader. I guess that makes them names rather than variables....
  • enums are alway static so there is no need to declare them static.
  • final doesn't do anything on anonymous classes because they can't be extended anyway. So we just remove the modifier.
  • Classes declared inside of interfaces are always static so we shouldn't also declare them as static.

I'm not sure that IDEs report all the violations but I'm personally fine with that, thanks @jasontedor

@jasontedor jasontedor merged commit 9a0b216 into elastic:master Feb 3, 2017
jasontedor added a commit that referenced this pull request Feb 3, 2017
This commit upgrades the checkstyle configuration from version 5.9 to
version 7.5, the latest version as of today. The main enhancement
obtained via this upgrade is better detection of redundant modifiers.

Relates #22960
@jasontedor
Copy link
Member Author

Thanks @nik9000 and @tlrx.

@jasontedor jasontedor deleted the checkstyle-7.5 branch February 3, 2017 15:47
@clintongormley clintongormley added the :Delivery/Build Build or test infrastructure label May 5, 2017
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v5.3.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants