ResourceInputStream[] patches = new ResourceInputStream[patchLocations.length];
for (int j=0;j<patches.length;j++){
patches[j] = new ResourceInputStream(getClassLoader(parent).getResourceAsStream(patchLocations[j]), patchLocations[j]);
}
ImportProcessor importProcessor = new ImportProcessor(this);
try {
sources = importProcessor.extract(sources);
patches = importProcessor.extract(patches);
} catch (MergeException e) {
throw new FatalBeanException("Unable to merge source and patch locations", e);
}
this.configResources = new MergeApplicationContextXmlConfigResource().getConfigResources(sources, patches);