diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageManagerImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageManagerImpl.java index 0fbc6ce60b8f..2f1c8dd29e84 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageManagerImpl.java @@ -188,7 +188,7 @@ public class InjectedLanguageManagerImpl extends InjectedLanguageManager impleme if (Thread.holdsLock(PsiLock.LOCK)) { // hack for the case when docCommit was called from within PSI modification, e.g. in formatter. // we can't spawn threads to do injections there, otherwise a deadlock is imminent - ContainerUtil.process(injected, commitProcessor); + ContainerUtil.process(new ArrayList(injected), commitProcessor); } else { commitInjectionsRunnable.run();