Project: JDT
Bug 50607 [extract method] Name ambiguous return value in error message
Reported: 2004-01-26 09:45:43 | Status: verified fixed

Sometimes a get an error message about ambigous return values, when I want to extract a method. This message is correct, but not very comforable. It would be better to explicitly name all variables that are ambigous to be able to decide which variables must be refactored first. best regards Thorsten van Ellen P.S.: Of course, it would be much better, if the refactoring could refactor those variables, too. One simplistic way could be, to use "PrimitiveVariable"-classes as "value by reference", e.g. ObjectVariable and IntVariable: class ObjectVariable { public Object value; public ObjectVariable(Object value) { this.value = value; } } class IntVariable { public int value; public ObjectVariable(int value) { this.value = value; } }

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodAnalyzer.java