Commit 66800f66 authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

make better configuration

parent 83a04c79
......@@ -735,16 +735,18 @@ public class SwissUtilityParameters {
String line = null;
while ((line = reader.readLine()) != null) {
String[] parts = line.split("=");
if (!(line.trim().length() == 0 || line.trim().startsWith("#"))) {
String[] parts = line.split("=");
if (parts.length != 2) {
reader.close();
throw new RuntimeException("Error while parsing line: " + line);
} else {
String option = parts[0].trim();
String value = parts[1].trim();
if (parts.length != 2) {
reader.close();
throw new RuntimeException("Error while parsing line: " + line);
} else {
String option = parts[0].trim();
String value = parts[1].trim();
values.put(option, Double.parseDouble(value));
values.put(option, Double.parseDouble(value));
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment