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.
Summary: | Deadlock loading library system | ||
---|---|---|---|
Product: | projects | Reporter: | Jesse Glick <jglick> |
Component: | Libraries | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jtulach |
Priority: | P3 | Keywords: | RANDOM, THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Thread dumps |
Description
Jesse Glick
2008-03-26 15:32:48 UTC
Created attachment 59139 [details]
Thread dumps
The accessor pattern is deadlock prone. The deadlock can be fixed like it is done in JavaSourceAccessor. ACCESSOR: public static synchronized JavaSourceAccessor getINSTANCE () { if (INSTANCE == null) { try { Class.forName("org.netbeans.api.java.source.JavaSource", true, JavaSourceAccessor.class.getClassLoader()); //NOI18N assert INSTANCE != null; } catch (ClassNotFoundException e) { Exceptions.printStackTrace(e); } } return INSTANCE; } public static void setINSTANCE (JavaSourceAccessor instance) { assert instance != null; INSTANCE = instance; } private static volatile JavaSourceAccessor INSTANCE; JavaSource static init just calls setINSTANCE(). Fixed in: 605701ceff59 |