Skip to content

fix: avoid unwrapping empty array initializer with comments#784

Merged
jtkiesel merged 1 commit intojhipster:mainfrom
jtkiesel:fix/empty-array-initializer-with-comments
Oct 14, 2025
Merged

fix: avoid unwrapping empty array initializer with comments#784
jtkiesel merged 1 commit intojhipster:mainfrom
jtkiesel:fix/empty-array-initializer-with-comments

Conversation

@jtkiesel
Copy link
Contributor

What changed with this PR:

Empty array initializers with comments are no longer unwrapped to avoid making code uncompilable.

Example

Input

class Example {

  String[] DATA = {
    // nothing yet
  };
}

Output

class Example {

  String[] DATA = {
    // nothing yet
  };
}

Relative issues or prs:

Closes #782

@jtkiesel jtkiesel merged commit d11d362 into jhipster:main Oct 14, 2025
6 checks passed
@jtkiesel jtkiesel deleted the fix/empty-array-initializer-with-comments branch October 14, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty array initializer with line-end comment folded wrongly

1 participant