Collection<ExternalDependency> (@Nullable Collection<? extends ExternalDependency> dependencies) { if (dependencies == null) return null; Collection<ExternalDependency> result = new ArrayList<>(dependencies.size()); for (ExternalDependency dependency : dependencies) { result.add(createCopy(dependency)); } return result; }