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: support JLS type annotations style #586

Merged

Conversation

jtkiesel
Copy link
Contributor

What changed with this PR:

Annotations placed after other modifiers on field declarations are no longer moved before all modifiers, allowing field declarations to follow JLS's formatting of type annotations the same way methods do.

Example

Input

class Example {

  @AnotherAnnotation
  private @Nullable Object object;

  @AnotherAnnotation
  private @Nullable Object method() {
    return null;
  }
}

Output

class Example {

  @AnotherAnnotation
  private @Nullable Object object;

  @AnotherAnnotation
  private @Nullable Object method() {
    return null;
  }
}

Relative issues or prs:

Fix #525

@DanielFran DanielFran added $100 https://www.jhipster.tech/bug-bounties/ $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ labels Aug 12, 2023
@clementdessoude clementdessoude merged commit 2b81885 into jhipster:main Aug 15, 2023
7 checks passed
@jtkiesel jtkiesel deleted the fix/support-jls-type-annotations-style branch August 16, 2023 01:59
@jtkiesel
Copy link
Contributor Author

@DanielFran
Copy link
Member

@jtkiesel approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

violates JLS formatting for type annotations
3 participants