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 138303 - Change Method Parameters doesn't perform import
Summary: Change Method Parameters doesn't perform import
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Max Sauer
Depends on: 164764
Blocks: 152192
  Show dependency tree
Reported: 2008-06-26 01:33 UTC by Torbjorn Norbye
Modified: 2009-05-11 13:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2008-06-26 01:33:43 UTC
I used the change method parameters refactoring to remove a couple of old parameters, and add a new parameter.

For the type of the new parameter, I typed in the fully qualified name (package+class) of the type.  But when I applied
the refactoring, it would insert the FQN name in the method declarations. I don't want that, I want it imported in the
import section like all the other classes in the same file.

So, I went back and typed in only the class name in the refactoring dialog (without the package). Refactoring succeeded,
but it did -not- add an import statement in the various client classes, so I had to go through all of them and do an import.

I think refactoring should use the class without the package name in the parameter list, and do an import instead
(unless there is a name conflict in the class). I don't think anybody considers inlining FQNs is good style.
Comment 1 Max Sauer 2009-02-20 09:22:13 UTC
Comment 2 Quality Engineering 2009-02-22 07:55:32 UTC
Integrated into 'main-golden', will be available in build *200902220201* on (upload may still be in progress)
User: Max Sauer <>
Log: #138303: Change Method Parameters doesnt perform import