if(propertyMap != null) {
Iterator keys = propertyMap.keySet().iterator();
while(keys.hasNext()) {
Object key = keys.next();
if(key instanceof String) {
properties.put(new CaselessStringKey((String)key),
propertyMap.get(key));
} else if(key instanceof CaselessStringKey) {
properties.put((CaselessStringKey)key,
propertyMap.get(key));
}
}
}
if(propertySource != null) {
String[] names = propertySource.getPropertyNames();
if(names != null) {
int length = names.length;
for(int i = 0; i < length; i++) {
propertySources.put(new CaselessStringKey(names[i]),
propertySource);
}
}
}
}