<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57294>57294</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format indents java new array expression poorly
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format,
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zmodem
      </td>
    </tr>
</table>

<pre>
    Consider:

```
$ cat | clang-format -style=chromium --assume-filename=x.java
class C {
  public void f() {
    waitForKeyboardStates(3, 1, 5, new Integer[] {TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.TEXT});
  } 
}
```

it prints:

```
class C {
    public void f() {
        waitForKeyboardStates(3, 1, 5,
                new Integer[] {TextInputType.NUMBER, TextInputType.NUMBER, TextInputType.NUMBER,
                        TextInputType.TEXT});
    }
}
```

It would have been nicer to align the TextInputType values, as it would do if we drop the `--assume-filename` argument:

```
class C {
 public
  void f() {
    waitForKeyboardStates(
        3, 1, 5,
        new Integer[]{TextInputType.NUMBER, TextInputType.NUMBER,
                      TextInputType.NUMBER, TextInputType.TEXT});
  }
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VN9vmzAQ_mvg5ZQITCDhgYclaaVq2h62TNrrgQ9wZTCyTdLsr59Nmq1RuypRNcs66-7s-_F9tkvFj8VG9UZw0kHyKYi2QXSWWfQ8TypbQIUWguUGKol9M6uV7pxhZuxRUpBsq1arTowdzGZozNjRrBaSeuy882n-iHs8hXLHjYGNC7U-GQCGsZSigr0SHOqArQKWv3QDHFDYe6U_07FUqPl3i5aM25gEbAOxF6kXPR3gobfUuHbSdZBufZQdPdmHfhjt7jjQ_OuPL-u7b37zx-y7u5-7YLl1lQbJn0KdAZ7xcq43cZyksDBo0VvzPuhvIHUFVtfjdXnmPP4niG9nPI8rEJ4wvgbiBwsHNUoOLe4JSqIeelGRBqsApWh6sC1dZoQ9ytHDtAE0IM4BuAJRw4GAazVMp1yq15c8iwB140y9vZXVE6XnFm9_BZeovsfxK25vp_Y9Cj_2dP5Fa0hFnGUxW6SrNAt5kfA8yTG0wkoqLj4j0XMHvwH_2Uy9otZ4BHoaNBkjVA-DUloew1HLorV2mB4gu3ezEbYdy3mlOqdIuT8vs0GrR6qsU4Vj3ON9ny5ZvgjbgkVJVbNsWWFc1-kqjhCresFZXeZpzPM4lFiSNIWHmrGXlTrV4-IWX-UU2JvSbShcVMaiFUuiPI7SbI451chXcVyVyPMoCRYRdSjk3Fc3V7oJdTEVWo6NcU4pjDV_ne6uuctOVJz4DnG0rdLFr05x6sIpczH18xsDvcHZ">