Thomas Zimmermann created NETBEANS-431:
------------------------------------------

             Summary: Support variables in try-with-resources added in Java 9
                 Key: NETBEANS-431
                 URL: https://issues.apache.org/jira/browse/NETBEANS-431
             Project: NetBeans
          Issue Type: Improvement
          Components: java - Editor
    Affects Versions: 9.0
            Reporter: Thomas Zimmermann
         Attachments: variables-in-try-with-resources.zip

Hi!

I'm running Netbeans incubator-netbeans-release-218-on-20180220. Having this 
code in a Java 9 Maven project:
{code:java}
AutoCloseable closeable = Stream.of();
try (closeable) {}
{code}
Right now leads to the following error in the editor:
{noformat}
variables in try-with-resources not supported in -source 1.8
  (use -source 9 or higher to enable variables in try-with-resources){noformat}
I attached a trivial project with this code for convenience.



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

Reply via email to