-
Notifications
You must be signed in to change notification settings - Fork 918
Open
Labels
EditorJava[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)kind:bugBug report or fixBug report or fixneeds:triageRequires attention from one of the committersRequires attention from one of the committers
Description
Apache NetBeans version
Apache NetBeans 28
What happened
When having configured brace placement for class declarations to "New Line", invoking Source > Format on a record class declaration incorrectly indents the opening brace.
Language / Project Type / NetBeans Component
Java, Editor
How to reproduce
In Options > Editor > Formatting > Java > Braces > Braces Placement, set Class Declaration to New Line. Then invoke Source > Format on the following code:
record ExampleRecord(int a, int b) { }The result is:
record ExampleRecord(int a, int b)
{
}The opening brace is incorrectly indented by one level.
The expected correct result would be:
record ExampleRecord(int a, int b)
{
}Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
JDK 21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EditorJava[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)kind:bugBug report or fixBug report or fixneeds:triageRequires attention from one of the committersRequires attention from one of the committers