List<Sdk> (@Nullable String sdkName) { if (sdkName == null) return Collections.emptyList(); List<Sdk> result = new ArrayList<>(); for (PendingDownload task : myPendingTasks) { for (Sdk sdk : task.myEditableSdks.copy()) { if (Objects.equals(sdkName, sdk.getName())) { result.add(sdk); } } } return result; }