From a4030467cc9b85e9e3a2968caa03fc655d6590b4 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 21 May 2015 13:44:14 +0200 Subject: [PATCH] PomModelImpl: don't swallow exceptions caught in finally --- .../src/com/intellij/pom/core/impl/PomModelImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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