in src/main/java/org/apache/commons/configuration2/CompositeConfiguration.java [343:371]
public List<Object> getList(final String key, final List<?> defaultValue) {
final List<Object> list = new ArrayList<>();
// add all elements from the first configuration containing the requested key
final Iterator<Configuration> it = configList.iterator();
while (it.hasNext() && list.isEmpty()) {
final Configuration config = it.next();
if (config != inMemoryConfiguration && config.containsKey(key)) {
appendListProperty(list, config, key);
}
}
// add all elements from the in memory configuration
appendListProperty(list, inMemoryConfiguration, key);
if (list.isEmpty()) {
// This is okay because we just return this list to the caller
@SuppressWarnings("unchecked")
final List<Object> resultList = (List<Object>) defaultValue;
return resultList;
}
final ListIterator<Object> lit = list.listIterator();
while (lit.hasNext()) {
lit.set(interpolate(lit.next()));
}
return list;
}