netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Java record formatting with annotation problem

Open VictorKwok opened this issue 3 years ago • 2 comments

Apache NetBeans version

Apache NetBeans 14

What happened

Whenever formating a record which using @JsonInclude, the formatting is not correct.

How to reproduce

Please try to format this:

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    public record AccountBalance(
            String id,
            AccountType type,
            String name,
            String description,
            AssetType assetType,
            AccountUsage usage,
            Currency currency,
            BigDecimal balance,
            BigDecimal openBalance,
            OffsetDateTime openBalanceAt) {

    }

Did this work correctly in an earlier version?

No

Operating System

Windows 11

JDK

Oracle JDK 18.0.1.1

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

It can be repeated everytime.

Are you willing to submit a pull request?

No

Code of Conduct

Yes

VictorKwok avatar Jul 19 '22 02:07 VictorKwok

Please share the output and what you expect the output to be. Thanks.

neilcsmith-net avatar Jul 19 '22 10:07 neilcsmith-net

For example, this is my record: image After right click -> Format image Expected: image

VictorKwok avatar Jul 20 '22 02:07 VictorKwok

fixed by #5374

VictorKwok avatar Mar 01 '23 05:03 VictorKwok