Community
Participate
Working Groups
HEAD 20030708 ICompilationUnit unit= new ...; unit.becomeWorkingCopy(); <modify working copy> unit.commitWorkingCopy(); -> no exception and underlying resource still unchanged. Offending code in CompilationUnit: public void save(IProgressMonitor pm, boolean force) throws JavaModelException { if (!isWorkingCopy()) { super.save(pm, force); return; } ... } isWorkingCopy() always returns true in this scenario.
Need immediate attention.
Fixed CompilationUnit.save(...) to allow saving of a primary working copy. Added regression test WorkingCopyOwnerTests.testCommitPrimaryWorkingCopy(). Posted patch on JDT/Core web page.
Verified.