mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] making JavaSdkImpl#getToolsPath return correct value (i.e. null) on 9+
GitOrigin-RevId: 5d41b5310bbf396a8f937c75f94cb705b2117403
This commit is contained in:
committed by
intellij-monorepo-bot
parent
45eabcf65f
commit
755e8e13d8
@@ -27,7 +27,6 @@ import com.intellij.openapi.vfs.newvfs.events.VFileCreateEvent;
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent;
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.containers.JBIterable;
|
||||
import com.intellij.util.containers.MultiMap;
|
||||
@@ -156,9 +155,9 @@ public final class JavaSdkImpl extends JavaSdk {
|
||||
|
||||
@Override
|
||||
public String getToolsPath(@NotNull Sdk sdk) {
|
||||
final String versionString = sdk.getVersionString();
|
||||
final boolean isJdk1_x = versionString != null && (versionString.contains("1.0") || versionString.contains("1.1"));
|
||||
return getConvertedHomePath(sdk) + "lib" + File.separator + (isJdk1_x? "classes.zip" : "tools.jar");
|
||||
JavaVersion version = getJavaVersion(sdk);
|
||||
return version == null || version.feature > 9 ? null :
|
||||
getConvertedHomePath(sdk) + "lib" + File.separator + (version.feature < 2 ? "classes.zip" : "tools.jar");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user