The fix for 6616323 adds synchronization on AWT tree lock to several methods in Container class (probably, in Component as well). AWT tree lock is a public lock that should be used for any hiearchy or layout operations *by developers*, not by AWT. That's why internal synchronization must be removed, and a warning about calling these methods without tree lock should be added.

Comments

EVALUATION
Historically, we didn't get AWT tree lock in these three methods:
- Container.getComponent(index)
- Container.getComponents()
- Container.countComponents()
There are some applications (like Oracle Forms based), that rely on this behavior and face deadlocks after the fix for 6616323. Technically, these applications are incorrect, as JavaDoc for AWT tree lock explicitly says it should be used for component-tree and layout operations, so AWT expects these methods should be synchronized by developers.
The fix for this bug is to revert the old (pre-6u10) behavior and remove newly added synchronization from the methods mentioned above. Still, all the applications that call them without AWT tree lock must realize that they do this on their own risk. For example, due to some timings changes, the methods may return incorrect values without proper synchronization under AWT tree lock.

2009-01-13

EVALUATION
Shouldn't take the tree lock when doing some operations w/ children.