nmatt opened a new issue, #9295:
URL: https://github.com/apache/netbeans/issues/9295

   ### Apache NetBeans version
   
   Apache NetBeans 29
   
   ### What happened
   
   Since Java 9, the constructor calls for a parameterized anonymous class can 
use the diamond operator instead of repeating the type arguments. However, 
NetBeans code completion still inserts the type arguments.
   
   ### Language / Project Type / NetBeans Component
   
   Java
   
   ### How to reproduce
   
   Example:
   ```java
   abstract class Example<T>
   {
       abstract T foo();
       
       static 
       {
           Example<ThreadLocal<StackTraceElement>> example = new Example
       }
   }
   ```
   Invoking code completion results in unnecessarily repeating the type 
argument:
   ```java
           Example<ThreadLocal<StackTraceElement>> example = new 
Example<ThreadLocal<StackTraceElement>>() {
               ...
           };
   ```
   Expected result for source level ≥ 9:
   ```java
           Example<ThreadLocal<StackTraceElement>> example = new Example<>() {
               ...
           };
   ```
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows
   
   ### JDK
   
   21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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