Sdk (List<? extends Sdk> sdkList, @Nullable String path) { if (path != null) { for (Sdk sdk : sdkList) { if (sdk != null && FileUtil.pathsEqual(path, sdk.getHomePath())) { return sdk; } } } return null; }