You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Ty Young <yo...@gmail.com> on 2021/09/28 18:21:05 UTC

JDK 18 / Netbeans 12.5 suitable constructor bug

FYI, there is a bug in which error Netbeans shows to the users in the 
event that a non-suitable object is passed to another object while using 
generics. For example:


List<String> list = new ArrayList<>("");


Will claim that the type cannot be inferred. However, if you redundantly 
specify String in the diamond operator:


List<String> list = new ArrayList<String>("");


Netbeans 12.5(no nb-javac) will now correctly report that there is no 
suitable ArrayList constructor that accepts a String.




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

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