This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE Dev (Build 201607210002) Operating System = Linux version 4.4.0-31-generic running on amd64 Java; VM; Vendor = 1.8.0_102 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.102-b14 Reproducibility: Happens every time In the code snippet below, the last line is flagged as an error in the Java editor in this build. The error is Error: incompatible types: ArrayList<CAP#1> cannot be converted to ArrayList<IOrderItem> where CAP#1 is a fresh type-variable: CAP#1 extends IOrderItem from capture of ? extends IOrderItem No error is reported during a clean + build. This was not a problem in NB 8.1
Created attachment 161386 [details] IDE log
Oops - here is the code snippet. public DialogSelectShipWeek(OE2 a_owner, Customer a_customer, Collection<? extends IOrderItem> a_items) { super(a_owner, true); ArrayList<IOrderItem> items = new ArrayList<>(a_items);
Unfortunately, I cannot reproduce the problem in the current dev build. If you are still able to reproduce the problem, could you please create a simple test project and attach it to the issue? Thanks.
https://github.com/FrantaM/bug267256 The line is flagged as error only if project's Source/Binary format is set to 1.7.