[2021.2 compat] Use JavaSdkVersion#fromVersionString instead of JavaSdk.getVersion
JavaSdk.getVersion is [removed in 2021.2 plugin api](https://github.com/JetBrains/intellij-community/commit/ceabbfbca39641598935dd1b443c8885d6112f53#diff-3a40b8fc13b1513064f7af20e013f753313119a7851a5581091557831c3233cd), this CL uses the recommended replacement for it; JavaSdkVersion#fromVersionString which is available in all the currently supported versions.
@@ -200,7 +200,7 @@ public class Jdks {
if (version == null) {
return JavaSdkVersion.JDK_1_0;
}
- JavaSdkVersion sdkVersion = JavaSdk.getInstance().getVersion(version);
+ JavaSdkVersion sdkVersion = JavaSdkVersion.fromVersionString(version);
return sdkVersion == null ? JavaSdkVersion.JDK_1_0 : sdkVersion;
}
