/** * Extract core names. * * @param cores All the available cores. * @return The core's name. */ private static Iterable<String> coreNames(final CoreContainer cores) { List<String> names = new ArrayList<String>(); for (SolrCore core : cores.getCores()) { String name = core.getName(); if (isEmpty(name)) { // This is the default core. name = cores.getDefaultCoreName(); } names.add(name); } return names; }