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

fix improper class/method/field modifiers #10837

Merged

Conversation

hangc0276
Copy link
Contributor

Motivation

The some java class/method/field modifiers are improper used.

Oracle java modifier order documentation:
https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.1.1

Class Modifiers

Class Modifier:
(one of)
Annotation public protected private
abstract static final strictfp

Method Modifiers

MethodModifier:
(one of)
Annotation public protected private
abstract static final synchronized native strictfp

Field Modifiers

FieldModifier:
(one of)
Annotation public protected private
static final transient volatile

Modification

Change mis-ordered modifiers.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

IIRC there is a checkstyle rule, can we activate it please ?

@hangc0276
Copy link
Contributor Author

LGTM

IIRC there is a checkstyle rule, can we activate it please ?

@eolivelli good idea, i work for it.

@hangc0276 hangc0276 force-pushed the chenhang/fix_improper_field_modifer branch from 0250cbb to 896a492 Compare June 7, 2021 02:23
@Anonymitaet
Copy link
Member

@hangc0276 thanks for your contribution. For this PR, do we need to update docs?

@merlimat merlimat added this to the 2.9.0 milestone Jun 7, 2021
@merlimat merlimat added the type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use label Jun 7, 2021
@hangc0276
Copy link
Contributor Author

@hangc0276 thanks for your contribution. For this PR, do we need to update docs?

@Anonymitaet No need to update docs, thanks.

@hangc0276
Copy link
Contributor Author

LGTM

IIRC there is a checkstyle rule, can we activate it please ?

@eolivelli I have add the modifier order check, PTAL.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

looks great

@eolivelli eolivelli merged commit f25b4a5 into apache:master Jun 7, 2021
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
codelipenghui pushed a commit that referenced this pull request Sep 9, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life release/2.8.2 type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants