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 218053

Summary: IllegalArgumentException after ChangeMethodParameters refactoring
Product: java Reporter: Jan Lahoda <jlahoda>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 207264    

Description Jan Lahoda 2012-09-10 08:59:21 UTC
Spin-off of:
http://netbeans.org/bugzilla/show_bug.cgi?id=207264#c14

To reproduce: use the Change Method Parameters refactoring, take a method with two parameters, alter their order and change the name of one of them in the same refactoring.

The reason why the problem manifests itself is that the same place in the source code is modified by two different ModificationResult: one is renaming the parameter, and another is changing the order. I am afraid I don't see a way to make that work on the MR/java.source level. Would it be possible to run the rename refactoring more directly in the same JavaSource.runModificationTask as the parameters order change and produce only one ModificationResult for both of these changes?
Comment 1 Ralph Ruijs 2012-09-19 08:22:56 UTC
changeset:  4035101e4561
tag:         tip
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Wed Sep 19 10:21:18 2012 +0200
summary:     #218053 merge rename tranformer into change method parameters
Comment 2 Quality Engineering 2012-09-20 02:27:41 UTC
Integrated into 'main-golden', will be available in build *201209200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4035101e4561
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #218053 merge rename tranformer into change method parameters