Project: JDT
Bug 43750 synchronized follows generated delegate [code manipulation]
Reported: 2003-09-26 11:11:29 | Status: resolved fixed

Using the Source->Generate Delegate Methods . . ., given, public class Foo { public synchronized int doThis() { . . . } } Eclipse will generate the delegate for foo.doThis as, public class Bar { private Foo foo; public synchronized int doThis() { return foo.doThis();} } which amounts to double synchronization, bad karma. It should IMHO do the following. public class Bar { private Foo foo; public int doThis() { return foo.doThis();} }

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java