mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
always call tearDown, small optimization
This commit is contained in:
+5
-3
@@ -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()
|
||||
}
|
||||
|
||||
+7
-5
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user