mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Disabled "Cycle in components initialization" false positive when the component throws an exception during initialization
This commit is contained in:
+15
-9
@@ -578,17 +578,23 @@ public abstract class ComponentManagerImpl extends UserDataHolderBase implements
|
||||
LOG.error(new Throwable("Cyclic component initialization: " + componentKey));
|
||||
}
|
||||
}
|
||||
myInitializing = true;
|
||||
myComponentsRegistry.registerComponentInstance(componentInstance);
|
||||
initComponent(componentInstance);
|
||||
long endTime = System.nanoTime();
|
||||
long ms = (endTime - startTime) / 1000000;
|
||||
if (ms > 10) {
|
||||
if (logSlowComponents()) {
|
||||
LOG.info(componentInstance.getClass().getName() + " initialized in " + ms + " ms");
|
||||
|
||||
try {
|
||||
myInitializing = true;
|
||||
myComponentsRegistry.registerComponentInstance(componentInstance);
|
||||
initComponent(componentInstance);
|
||||
long endTime = System.nanoTime();
|
||||
long ms = (endTime - startTime) / 1000000;
|
||||
if (ms > 10) {
|
||||
if (logSlowComponents()) {
|
||||
LOG.info(componentInstance.getClass().getName() + " initialized in " + ms + " ms");
|
||||
}
|
||||
}
|
||||
}
|
||||
myInitializing = false;
|
||||
finally {
|
||||
myInitializing = false;
|
||||
}
|
||||
|
||||
myInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user