private static List<String> asSourcesList(String directory) {
    return directory == null ? Collections.emptyList() : Collections.singletonList(directory);
  }
private static List<String> asSourcesList(String directory)