Sdk (@NotNull String name, @NotNull String type) { Sdk projectJdk = findJdk(name); if (projectJdk != null) { return projectJdk; } final String uniqueName = type + "." + name; projectJdk = myCachedProjectJdks.get(uniqueName); if (projectJdk != null) return projectJdk; @NonNls final String jdkPrefix = "jdk."; final String jdkPath = System.getProperty(jdkPrefix + name); if (jdkPath == null) return null; final SdkType sdkType = SdkType.findByName(type); if (sdkType != null && sdkType.isValidSdkHome(jdkPath)) { ProjectJdkImpl projectJdkImpl = new ProjectJdkImpl(name, sdkType); projectJdkImpl.setHomePath(jdkPath); sdkType.setupSdkPaths(projectJdkImpl); myCachedProjectJdks.put(uniqueName, projectJdkImpl); return projectJdkImpl; } return null; }