private static boolean isJdkSupportsLevel(@Nullable Sdk jdk, @NotNull LanguageLevel level) {
    if (jdk == null) return true;
    JavaSdkVersion version = JavaSdkVersionUtil.getJavaSdkVersion(jdk);
    JavaSdkVersion required = JavaSdkVersion.fromLanguageLevel(level);
    return version != null && (level.isPreview() ? version.equals(required) : version.isAtLeast(required));
  }
private static boolean isJdkSupportsLevel(@Nullable Sdk jdk, @NotNull LanguageLevel level)