in plugins/org.apache.karaf.eik.app/src/main/java/org/apache/karaf/eik/app/internal/SystemPropertyLoader.java [120:165]
private Properties loadProperties(URL source) {
final Properties props = new Properties();
InputStream in = null;
try {
in = source.openConnection().getInputStream();
props.load(in);
in.close();
} catch (FileNotFoundException ignoreFileNotFoundException) {
// Ignore file not found
} catch (Exception e) {
e.printStackTrace();
// Attempt to close the input stream ignoring exceptions
try {
if (in != null) {
in.close();
}
} catch (IOException ex2) {
// Nothing to do
}
}
final String includes = props.getProperty(INCLUDES_PROPERTY);
if (includes != null) {
final StringTokenizer st = new StringTokenizer(includes, "\" ", true);
if (st.countTokens() > 0) {
String location;
do {
location = nextLocation(st);
if (location != null) {
try {
URL url = new URL(source, location);
Properties includeProps = loadProperties(url);
props.putAll(includeProps);
} catch (MalformedURLException e) {
// TODO: What to throw?
}
}
} while (location != null);
}
props.remove(INCLUDES_PROPERTY);
}
return props;
}