[
https://issues.apache.org/jira/browse/NETBEANS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Alex reopened NETBEANS-236:
-------------------------------
I have been seeing this exact same issue with NetBeans 11.0 (and NetBeans 10.0
before it).
To reproduce:
* Install NetBeans 11.0 (I'm using build 20190407 on Arch Linux)
* Delete any existing ~/.netbeans so you have no prior configuration
* Create a new Java project and class using the defaults
* Enter a simple method like shown below
* Attempt to format
{{ public void test() throws IOException {}}
{{ try(InputStream is = new ByteArrayInputStream(new byte[] {})) {}}
{{ // ...}}
{{ }}}
{{ }}}
The resulting format will have a space incorrectly inserted before InputStream.
This is despite Options > Editor > Formatting > Spaces having no ticks for any
"Within Parentheses" options. It is interesting to note the "Alignment"
category preview shows the incorrect insertion of spaces, ie:
{{try ( Resource r1 = null;}}
{{ Resource r2 = getResource()) {}}
> Incorrect brace spacing in try-with-resources
> ---------------------------------------------
>
> Key: NETBEANS-236
> URL: https://issues.apache.org/jira/browse/NETBEANS-236
> Project: NetBeans
> Issue Type: Bug
> Components: editor - Formatting & Indentation
> Affects Versions: 8.2
> Environment: build 152
> Reporter: Gili
> Assignee: Gili
> Priority: Major
> Fix For: 9.0
>
>
> Given:
> {{try (Session session = scope.getSession())}}
> Invoking code-format results in:
> {{try ( Session session = scope.getSession())}}
> in spite of the fact that the IDE is configured not to insert a space inside
> the parenthesis.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists