Community
Participate
Working Groups
The fix for bug 218137 introduced double checked locking in WorkbenchErrorHandler#getStatusDialogManager(). This pattern is considered broken because this can return partially constructed objects to clients. See http://en.wikipedia.org/wiki/Double-checked_locking, http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
The pattern is considered broken only for multithreaded apps. WorkbenchErrorHandler#handle ensures that all private methods are called only from UI thread, therefore partial initialization of statusDialogManager field will not happen. Feel free to reopen if I am wrong.
(In reply to comment #1) > The pattern is considered broken only for multithreaded apps. > WorkbenchErrorHandler#handle ensures that all private methods are called only > from UI thread, therefore partial initialization of statusDialogManager field > will not happen. > > Feel free to reopen if I am wrong. Oh, I was not aware that this method is only called from the UIThread. But then, just out of curiosity: what's the use of this synchronized block at all given that the private field statusDialogManager is only accessed from this very method and therefore only from the UIThread?