Project: JDT
Bug 149540 [ltk] problems overriding TextFileChange#commit() [refactoring]
Reported: 2006-07-04 05:40:45 | Status: verified fixed

The implementation of TextFileChange.commit() may not actually perform the commit: if (needsSaving()) { fBuffer.commit(pm, false); } If I override the method, I cannot use the same condition, as needsSaving() is private. Even if I rely on the TextFileChange.commit() by calling super.commit() I then do not know if the commit was actually performed. I suggest to move the if-statement to the method perform(), such that commit() is called when it is supposed to be performed, only.

Files changed in fix:
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/TextFileChange.java