google / google/google-java-format

Weird format in constructor with annotated args

未關閉
#439 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
6.2k
分支
937
平均合併
6 分鐘
30 天內合併 PR
3

描述

Hello!

I'm working on a Spring Batch application using IntelliJ IDEA 2019.3.3 CE and I noticed a "weird" format using google-java-format 1.7.

Code before gjf:

```
@Autowired
public AllineamentoTasklet(
final @NonNull StoreRestRepository storeRepository,
final @NonNull AllineamentoService allineamentoService,
final @NonNull @Value("${allineamento-app.store-types}") List storeTypes,
final @NonNull @Value("${allineamento-app.skippable-exceptions}") List> skippableExceptions) {
..
..
}

// @NonNull is lombok's
```

Code after gjf:

```
@Autowired
public AllineamentoTasklet(
final @NonNull StoreRestRepository storeRepository,
final @NonNull AllineamentoService allineamentoService,
final @NonNull @Value("${allineamento-app.store-types}") List storeTypes,
final @NonNull @Value("${allineamento-app.skippable-exceptions}") List<
Class>
skippableExceptions) {
..
..
}
```

Is this the expected result?

Thank you

貢獻指南

開啟貢獻指南

研究方向

Use the supplied constructor example and google-java-format 1.7 as the reproduction case. Compare the formatter's output with the expected Google Java Style and determine whether the split around List> is intentional. Done means confirming the behavior or identifying a specific formatter issue and the corrected output.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
tooling
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。