mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jdk] Fix leaking SDK in test
The NPW JDK combo can register a JDK if none were registered. This needs to be taken into account in tests #tearDown. GitOrigin-RevId: bc407e3d7e18e192ab8bacc3e3e4f24803ca9de7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bc8062ceb1
commit
fa3556e841
@@ -15,6 +15,7 @@ import com.intellij.openapi.module.BasePackageParameterFactory
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.project.ex.ProjectManagerEx
|
||||
import com.intellij.openapi.projectRoots.ProjectJdkTable
|
||||
import com.intellij.openapi.roots.ModuleRootManager
|
||||
import com.intellij.openapi.roots.ProjectRootManager
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
@@ -138,6 +139,9 @@ public class Bar {
|
||||
|
||||
override fun tearDown() {
|
||||
try {
|
||||
ProjectJdkTable.getInstance().apply {
|
||||
allJdks.forEach { removeJdk(it) }
|
||||
}
|
||||
(FileTemplateManager.getDefaultInstance() as FileTemplateManagerImpl).setTestDate(null)
|
||||
PropertiesComponent.getInstance().unsetValue(ProjectTemplateParameterFactory.IJ_BASE_PACKAGE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user