if (resourceName != null) {
Iterator iterator = app.getRepositories().iterator();
while (iterator.hasNext()) {
try {
Repository repository = (Repository) iterator.next();
Resource res = repository.getResource(resourceName);
if (res != null && res.exists()) {
InputStream in = res.getInputStream();
temp.load(in);
in.close();
}
} catch (IOException iox) {
iox.printStackTrace();
}
}
}
// if these are subproperties, reload them from the parent properties
if (parentProperties != null && prefix != null) {
parentProperties.update();
Iterator it = parentProperties.entrySet().iterator();
int prefixLength = prefix.length();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
String key = entry.getKey().toString();
if (key.regionMatches(ignoreCase, 0, prefix, 0, prefixLength)) {
temp.put(key.substring(prefixLength), entry.getValue());
}
}
}
// at last we try to load properties from the resource list
if (resources != null) {
Iterator iterator = resources.iterator();
while (iterator.hasNext()) {
try {
Resource res = (Resource) iterator.next();
if (res.exists()) {
InputStream in = res.getInputStream();
temp.load(in);
in.close();
}
} catch (IOException iox) {
iox.printStackTrace();