eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
[formatting][java] method with parameter annotation incorrectly formatted.
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 37
Description
Dear developers,
I have the following formatting settings

When I format the following code that uses [junit-pioneer](https://junit-pioneer.org/)'s [Cartesian product](https://junit-pioneer.org/docs/cartesian-product/):
```java
@CartesianTest
void test(@Values(booleans = {true, false}) boolean identical, @Values(ints = {2, 3, 4}) int low,
@Values(ints =
{4, 5}) int high) {
fail("todo");
}
```
nothing changes.
Yet since a wrap has occurred in my method declaration, I expected
```java
@CartesianTest
void test(@Values(booleans = {true, false}) boolean identical, @Values(ints = {2, 3, 4}) int low,
@Values(ints =
{4, 5}) int high)
{
fail("todo");
}
```
My expectations are confirmed by checkstyle:

Can you confirm that this is indeed a bug.
If so, could you please fix it?
Thanks in advance for your answers!
Contributor guide
Research direction
No source file or test is named in the issue. Start by reproducing the formatter behavior with the provided Java method and inspect the formatter handling of method declarations with parameter annotations. Done means the declaration is wrapped as shown and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100