mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not warn about getting service from under write action in tests. Too many positives.
This commit is contained in:
+5
-1
@@ -222,7 +222,11 @@ public class ServiceManagerImpl implements BaseComponent {
|
||||
ComponentAdapter delegate = getDelegate();
|
||||
|
||||
// useReadActionToInitService is enabled currently only in internal or test mode or explicitly (registry) - we have enough feedback to fix, so, don't disturb all users
|
||||
if (!useReadActionToInitService && LOG.isDebugEnabled() && ApplicationManager.getApplication().isWriteAccessAllowed() && PersistentStateComponent.class.isAssignableFrom(delegate.getComponentImplementation())) {
|
||||
if (!useReadActionToInitService &&
|
||||
LOG.isDebugEnabled() &&
|
||||
ApplicationManager.getApplication().isWriteAccessAllowed() &&
|
||||
!ApplicationManager.getApplication().isUnitTestMode() &&
|
||||
PersistentStateComponent.class.isAssignableFrom(delegate.getComponentImplementation())) {
|
||||
LOG.warn(new Throwable("Getting service from write-action leads to possible deadlock. Service implementation " + myDescriptor.getImplementation()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user