diff --git a/platform/core-impl/src/com/intellij/pom/core/impl/PomModelImpl.java b/platform/core-impl/src/com/intellij/pom/core/impl/PomModelImpl.java index 78d52db956b7..99917c33d77b 100644 --- a/platform/core-impl/src/com/intellij/pom/core/impl/PomModelImpl.java +++ b/platform/core-impl/src/com/intellij/pom/core/impl/PomModelImpl.java @@ -138,8 +138,8 @@ public class PomModelImpl extends UserDataHolderBase implements PomModel { if (!isAllowPsiModification()) { throw new IncorrectOperationException("Must not modify PSI inside save listener"); } - List throwables = new ArrayList(0); synchronized(PsiLock.LOCK){ + List throwables = new ArrayList(0); final PomModelAspect aspect = transaction.getTransactionAspect(); startTransaction(transaction); try{ @@ -209,10 +209,9 @@ public class PomModelImpl extends UserDataHolderBase implements PomModel { finally { DebugUtil.finishPsiModification(); } + if (!throwables.isEmpty()) CompoundRuntimeException.doThrow(throwables); } } - - if (!throwables.isEmpty()) CompoundRuntimeException.doThrow(throwables); } @Nullable