You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Bernd Michaely (Jira)" <ji...@apache.org> on 2020/03/07 02:00:10 UTC

[jira] [Created] (NETBEANS-3973) Code auto formatting for lambda arrows

Bernd Michaely created NETBEANS-3973:
----------------------------------------

             Summary: Code auto formatting for lambda arrows
                 Key: NETBEANS-3973
                 URL: https://issues.apache.org/jira/browse/NETBEANS-3973
             Project: NetBeans
          Issue Type: Bug
          Components: java - Editor
    Affects Versions: 11.3
         Environment: Arch Linux and the included "jdk11-openjdk" package, official NB 11.3 bin download
            Reporter: Bernd Michaely


Since NB 11.3, code auto formatting for lambda errors is broken. NB adds an additional space before the lambda arrow. To reproduce the problem choose

Menu Tools -> Options -> Editor -> Formatting ->

Language: Java

Category: Wrapping ->

- "Lambda Arrow" : Never

- Check "Wrap After Lambda Arrow"

Category: Spaces -> Around Operators

-> "Lambda Arrow" unchecked:

{{11.2: BinaryOperator plus = (a, b)->a+b;}}

{{11.3: BinaryOperator plus = (a, b)_->a+b;}}{{}}

-> or "Lambda Arrow" checked:

{{11.2: BinaryOperator plus = (a, b) -> a+b;}}

{{11.2: BinaryOperator plus = (a, b)_ -> a+b;}}{{}}

... the underscore chars indicating the additional space char.

Note, that the additional space only appears, if "Wrap After Lambda Arrow" is checked.

(This problem causes a lot of noise in Diff and VCS for existing code, so this is pretty annoying and currently prevents me from upgrading to NB 11.3)

 



--
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