This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In DebuggerEngine and DebuggerManager there are are get* methods, that are not synchronized, but apparently should return the same instance each time. The instance is constructed lazily upon the first call to the method.
Created attachment 22005 [details] The patch that fixes this.
Since this is an API change, a fast API review is necessary.
Looks like no brainer to me. Just make sure you do not call foreign code from the synchronized methods, as that could lead to deadlocks.
No foreign code is called from the synchronized methods, just almost empty constructors. Thanks for comments.
I had problems with "almost empty" constructors in Lookups.metaInfServices, but apparently there is no easy way around that, except documenting that the constructors cannot wait on any lock - e.g. be empty. If there is a place to put such warning (constructors are supposed to be empty) in documentation, I advice your to put it there.
Thanks for comments, will put the fix in. The constructors are private. I'll add the comment concerning call of foreign code into their javadoc.
Fixed in trunk: /cvs/debuggercore/api/src/org/netbeans/api/debugger/ActionsManager.java,v <-- ActionsManager.java new revision: 1.14; previous revision: 1.13 /cvs/debuggercore/api/src/org/netbeans/api/debugger/DebuggerEngine.java,v <-- DebuggerEngine.java new revision: 1.9; previous revision: 1.8 /cvs/debuggercore/api/src/org/netbeans/api/debugger/DebuggerManager.java,v <-- DebuggerManager.java new revision: 1.19; previous revision: 1.18
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.