From a270f2b778221655a8ecef40a1fa6a2894a2cf47 Mon Sep 17 00:00:00 2001 From: Louis Vignier Date: Thu, 23 Oct 2025 00:04:12 +0200 Subject: [PATCH] [jdk] IDEA-380369 Use suggestHomePaths(Project) in ExistingJdkConfigurationActivity The regular suggestHomePaths() does not take into account the location of the project. GitOrigin-RevId: 41aed028590cdae81091110732105582edb6866e --- .../projectRoots/impl/ExistingJdkConfigurationActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }) {