You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "dennis lucero (Jira)" <ji...@apache.org> on 2020/04/28 15:27:00 UTC

[jira] [Created] (NETBEANS-4268) Switch statement formatting: do not force newlines

dennis lucero created NETBEANS-4268:
---------------------------------------

             Summary: Switch statement formatting: do not force newlines
                 Key: NETBEANS-4268
                 URL: https://issues.apache.org/jira/browse/NETBEANS-4268
             Project: NetBeans
          Issue Type: Improvement
          Components: editor - Formatting &amp; Indentation
    Affects Versions: 11.3
         Environment: JDK 14
            Reporter: dennis lucero


When running autoformat, concise code like
{code:java}
String s(int i) {
    return switch (i) {
        case 1 -> "one";
        case 2 -> "two";
        default -> throw new UnsupportedOperationException();
    };
}
{code}
is replaced with
{code:java}
String s(int i) {
    return switch (i) {
        case 1 ->
            "one";
        case 2 ->
            "two";
        default ->
            throw new UnsupportedOperationException();
    };
}
{code}
which I find harder to read. I have not found a setting to disable this behaviour.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists