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