Fixed ConfigReader sometimes adding empty string to a null value.

This commit is contained in:
Rsl1122 2019-03-30 11:04:51 +02:00
parent 18d6b862b7
commit c8687b7c48
2 changed files with 2 additions and 7 deletions

View File

@ -365,11 +365,6 @@ public class ConfigNode {
@Override
public String toString() {
return "ConfigNode{" +
"key='" + key + '\'' +
", nodeOrder=" + nodeOrder +
", comment=" + comment +
", value='" + value + '\'' +
'}';
return "{'" + value + "' " + (!childNodes.isEmpty() ? childNodes : "") + '}';
}
}

View File

@ -150,7 +150,7 @@ public class ConfigReader implements Closeable {
}
String key = keyAndValue[0].trim();
String value = keyAndValue[1].trim();
return handleNewNode(key, value);
return handleNewNode(key, !value.isEmpty() ? value : null);
}
private ConfigNode handleMultiline(String line) {