private static @Nullable JavaSdkVersion getSdkVersion(ModifiableRootModel model) {
    Sdk sdk = ProjectRootManager.getInstance(model.getProject()).getProjectSdk();
    if (sdk != null) {
      SdkTypeId type = sdk.getSdkType();
      if (type instanceof JavaSdk) {
        return ((JavaSdk)type).getVersion(sdk);
      }
    }
    return null;
  }
private static @Nullable JavaSdkVersion getSdkVersion(ModifiableRootModel model)