Bug 107855 - [refactoring] reverse of "introduce parameter"
Summary: [refactoring] reverse of "introduce parameter"
Status: RESOLVED DUPLICATE of bug 53507
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-24 10:40 EDT by Adam Kiezun CLA
Modified: 2006-06-09 12:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2005-08-24 10:40:54 EDT
3.1
sometimes i have an argument that is a method call and could 
as well be computed by passing the args to the callee

example will make it clear:
private void foo(Set s){
   bar(s, s.size());
}

private void bar(Set c, int size){
   ....
}

the second parameter of bar is useless. It could be just computed:

private void foo(Set s){
   bar(s);
}

private void bar(Set c, int size){
   int size= c.size();
   ....
}

That of course only works sometimes. But maybe there's a simple and broad enough
pattern of useful cases.
Comment 1 Olivier Thomann CLA 2005-08-24 10:44:02 EDT
Move to JDT/UI
Comment 2 Adam Kiezun CLA 2005-08-24 10:48:37 EDT
oops. thx
Comment 3 Markus Keller CLA 2006-06-09 12:24:45 EDT

*** This bug has been marked as a duplicate of 53507 ***