netbeans
netbeans copied to clipboard
Formatting Issue - Wrapping for Java 21 Style Switch Cases that have Arrows
Apache NetBeans version
Apache NetBeans 21
What happened
Issue with Options -> Formatting -> Java -> Wrapping. Options set to.... Case Statements: Never Lambda Arrow: Never
Yet when using auto-format on the following, it turns into the next example.
var foo = switch(type) {
case NORTH -> "Santa Claus";
case SOUTH -> "Scientist";
default -> "Agent Smith";
}
Turns to:
var foo = switch(type) {
case NORTH ->
"Santa Claus";
case SOUTH ->
"Scientist";
default ->
"Agent Smith";
}
Language / Project Type / NetBeans Component
Java Maven Project
How to reproduce
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 10
JDK
jdk-21
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No