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.
1. Create new class ClassA: //---------------------------- public class ClassA{ public ClassA() { } public void m1(){ ClassA cA = new ClassA(); } } //---------------------------- 2. Put caret over constructor "ClassA" 3. invoke Refactor->Change Method Parameters... action from the popup menu. 4. In the Change Method Parameters dialog press the Add button and fill Type and Name for the new created parameter as int and id. Leave Default Value field empty. 5. Press Refactor button and you'll get this code: //---------------------------- public class ClassA{ public ClassA(int id) { } public void m1(){ ClassA cA = new ClassA(null); } } //---------------------------- -> it causess the error at line "... = new ClassA(null)": incompatible types: <null> cannot be converted to int
Product Version: NetBeans IDE Dev (Build 201306272300) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss