diff --git a/java/java-impl/src/com/intellij/openapi/projectRoots/impl/ExistingJdkConfigurationActivity.kt b/java/java-impl/src/com/intellij/openapi/projectRoots/impl/ExistingJdkConfigurationActivity.kt index b92d2557911e..dc14e245204d 100644 --- a/java/java-impl/src/com/intellij/openapi/projectRoots/impl/ExistingJdkConfigurationActivity.kt +++ b/java/java-impl/src/com/intellij/openapi/projectRoots/impl/ExistingJdkConfigurationActivity.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.projectRoots.impl import com.intellij.openapi.application.edtWriteAction @@ -31,7 +31,7 @@ private class ExistingJdkConfigurationActivity : ProjectActivity { val jdkPathsToAdd = ArrayList() // Collect JDKs to register - serviceAsync().suggestHomePaths().forEach { homePath: String -> + serviceAsync().suggestHomePaths(project).forEach { homePath: String -> if (javaSdk.isValidSdkHome(homePath) && registeredJdks.none { FileUtil.toCanonicalPath(it.homePath) == FileUtil.toCanonicalPath(homePath) }) {