DumbServiceImpl: don't evaluate heavy task.toString when not needed (IDEA-198484)

This commit is contained in:
peter
2018-09-06 17:32:47 +02:00
parent 9618814799
commit c0a0e4845b
@@ -235,7 +235,9 @@ public class DumbServiceImpl extends DumbService implements Disposable, Modifica
@Override
public void queueTask(@NotNull DumbModeTask task) {
if (LOG.isDebugEnabled()) LOG.debug("Scheduling task " + task);
LOG.assertTrue(!myProject.isDefault(), "No indexing tasks should be created for default project: " + task);
if (myProject.isDefault()) {
LOG.error("No indexing tasks should be created for default project: " + task);
}
final Application application = ApplicationManager.getApplication();
if (application.isUnitTestMode() || application.isHeadlessEnvironment()) {