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.

Bug 254997 - Change Method parameters add "null" in the method name
Summary: Change Method parameters add "null" in the method name
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-04 08:25 UTC by gokumar
Modified: 2015-09-08 14:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (66.47 KB, text/plain)
2015-09-04 08:25 UTC, gokumar
Details
Uninvited guest "null" in the method name (7.52 KB, image/png)
2015-09-04 08:26 UTC, gokumar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gokumar 2015-09-04 08:25:24 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5148/suite/2029

Product Version = NetBeans IDE Dev (Build 201508310002)
Operating System = Linux version 3.16.0-40-generic running on amd64 (Ubuntu)
Java; VM; Vendor = 1.8.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02

Reproducibility: Happens every time

STEPS:
1. Open inline.ClassA.java class
2. Put cursor over method m3, right click and from pop-up menu select Refactor > Change Method Parameters...
3. Add new parameter and click on [...] button inside the Type textbox
In occured dialog type ArrayLis and select java.util.ArrayList
4. Set name myList and leave Default Value null
5. Change name of method m3 to method3
6. Press "Preview", inspect all changes and then press "Do Refactoring"

ACTUAL:
1. Selected method gets a "null" in its name, so in this case 'm3' is supposed to become 'method3' but becomes 'metnullhod3'. Attached screen shot of the issue.
2. Undo works fine

EXPECTED:
- Preview correctly shows changes of m1 in classes: ClassA, From and interface MyInterface
- Code is every time compilable
- Undo/Redo works properly as expecte
Comment 1 gokumar 2015-09-04 08:25:33 UTC
Created attachment 155890 [details]
IDE log
Comment 2 gokumar 2015-09-04 08:26:24 UTC
Created attachment 155891 [details]
Uninvited guest "null" in the method name
Comment 3 Ralph Ruijs 2015-09-08 14:06:28 UTC
There have been some fixes which should be in builds after 01/09/15. Please update to a newer build and reopen if the issue is not fixed for you. Thanks!