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 - IllegalArgumentException after ChangeMethodParameters refactoring
Summary: IllegalArgumentException after ChangeMethodParameters refactoring
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks: 207264
  Show dependency tree
 
Reported: 2012-09-10 08:59 UTC by Jan Lahoda
Modified: 2012-09-20 02:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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