code: public org.apache.commons.configuration.Configuration getConfiguration(ConfigurationWrapper wrapper) {
  		// get input streams
  		List<ISource> sources = this.locate(wrapper);
  		
  		// create configuration combiner
  		OverrideCombiner combiner = new OverrideCombiner();
  		CombinedConfiguration combined = new CombinedConfiguration(combiner);
  		
  		// combine configurations
  		for(ISource source : sources) {
  			// determine mime type in order to create proper commons object
  			SupportedType type = MimeGuesser.guess(source);
  			
  			// if the source isn't available, continue
  			if(!source.available()) {
  				continue;
  			}
  			
  			InputStream stream = source.stream();
  			
  			// load properties based on MIME type
  			// todo: update for more commons-configuration
  			// supported mime types
  			if(SupportedType.XML.equals(type)) {
  				XMLConfiguration xmlConfiguration = new XMLConfiguration();
  				try {
  					xmlConfiguration.load(stream);
  					combined.addConfiguration(xmlConfiguration);
  				} catch(ConfigurationException e) {
  					this.logger.error("An error occurred while reading XML properties: {}", e.getMessage());	
  				}
  			} else {
  				PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration();
  				try {
  					propertiesConfiguration.load(stream);
  					combined.addConfiguration(propertiesConfiguration);
  				} catch (ConfigurationException e) {
  					this.logger.error("An error occurred while reading properties: {}", e.getMessage());
  				}				
  			}
  			
  			// close stream
  			try {
  				stream.close();
  			} catch (IOException e) {
  				this.logger.trace("Could not close old stream: {}", stream);
  			}
  			
  			// leave on first loop if merge is on
  			if(!wrapper.merge()) {
  				break;
  			}
  		}		
  		// return configuration
  		return combined;
  	}
docs: Shared implementation that is used to bootstrap other configurations if
  requested.
  
  @param wrapper the annotation to use for configuring
  @return the common configuration values