geforkt von Mirrors/FastAsyncWorldEdit
Improved formatting and performance of YAMLProcessor when no comments are present
Dieser Commit ist enthalten in:
Ursprung
a7c75285d9
Commit
29fd98879d
@ -183,8 +183,11 @@ public class YAMLProcessor extends YAMLNode {
|
||||
writer.append(header);
|
||||
writer.append(LINE_BREAK);
|
||||
}
|
||||
if (comments.size() == 0) {
|
||||
yaml.dump(root, writer);
|
||||
} else {
|
||||
// Iterate over each root-level property and dump
|
||||
for (Iterator<Map.Entry<String, Object>> i = root.entrySet().iterator(); i.hasNext();) {
|
||||
for (Iterator<Map.Entry<String, Object>> i = root.entrySet().iterator(); i.hasNext(); ) {
|
||||
Map.Entry<String, Object> entry = i.next();
|
||||
|
||||
// Output comment, if present
|
||||
@ -198,6 +201,7 @@ public class YAMLProcessor extends YAMLNode {
|
||||
// Dump property
|
||||
yaml.dump(Collections.singletonMap(entry.getKey(), entry.getValue()), writer);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
} finally {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren