public static boolean isValidJavaSdk(@NotNull Module module) {
    if (ModuleRootManager.getInstance(module).getSourceRoots(JavaModuleSourceRootTypes.SOURCES).isEmpty()) return true;
    JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(module.getProject());
    return ReadAction.compute(() -> psiFacade.findClass(CommonClassNames.JAVA_LANG_OBJECT, module.getModuleWithLibrariesScope())) != null;
  }
public static boolean isValidJavaSdk(@NotNull Module module)