always call tearDown, small optimization

This commit is contained in:
Vladimir Krivosheev
2018-01-19 17:43:58 +01:00
parent a7a9a7e716
commit da3abbd083
2 changed files with 12 additions and 8 deletions
@@ -1,6 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.compiler
import com.intellij.openapi.components.PersistentStateComponent
@@ -55,6 +53,10 @@ internal class ExternalCompilerConfigurationStorage(private val project: Project
}
internal fun getFilteredModuleNameList(project: Project, map: Map<String, String>, isExternal: Boolean): List<String> {
if (map.isEmpty()) {
return emptyList()
}
if (!project.isExternalStorageEnabled) {
return map.keys.toList()
}
@@ -1,6 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.module;
import com.intellij.openapi.application.WriteAction;
@@ -94,7 +92,11 @@ public class ModulesConfigurationTest extends PlatformTestCase {
@Override
protected void tearDown() throws Exception {
ApplicationManagerEx.getApplicationEx().doNotSave(myDoNotSaveValue);
super.tearDown();
try {
ApplicationManagerEx.getApplicationEx().doNotSave(myDoNotSaveValue);
}
finally {
super.tearDown();
}
}
}