[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Re: Flaws in Refactorings

Johannes Gebauer wrote:
Hi,

I am writing my master thesis about refoctoring tools. I examined some of the jdt refactorings and found some flaws and wondered if the behaviour was intended or should be reported as a bug.

1. "Push Down Field/Method" does not search for references outside the declaring class. When performing a push down on features that are used by other classes the refactoring produces compile errors.

2. "Move Instance Method" does not check any conditions. Hence it is possible to produce overriding without any warning or even create duplicate methods resulting in compile errors.

3. "Move Class" ignores feature accesses on protected members within the same package. If a class leaves its package these feature accesses to protected members produce compile errors due to visibility restrictions.

Maybe some of the above mentioned refactorings are still in work or are not that strict behaviour preserving as described in the literature.

It's good that you've asked here, but if you don't get satisfactory answers then you should enter each of these as a separate bug with detailed steps to reproduce.


In my own opinion, a refactoring operation should never produce code that does not compile (unless, perhaps, the user manually changed something in the refactor wizard).

Eric