From 3cdcc0445aaa2a97e0d65e502e2fa2a9e08f5654 Mon Sep 17 00:00:00 2001 From: zml Date: Sat, 14 Oct 2023 18:53:46 -0700 Subject: [PATCH] fix(format/yaml): Re-serialize complex keys properly --- .../org/spongepowered/configurate/yaml/YamlRepresenter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/yaml/src/main/java/org/spongepowered/configurate/yaml/YamlRepresenter.java b/format/yaml/src/main/java/org/spongepowered/configurate/yaml/YamlRepresenter.java index 7945aef7..10d662d3 100644 --- a/format/yaml/src/main/java/org/spongepowered/configurate/yaml/YamlRepresenter.java +++ b/format/yaml/src/main/java/org/spongepowered/configurate/yaml/YamlRepresenter.java @@ -58,7 +58,7 @@ public Node representData(final Object nodeObject) { for (Map.Entry ent : node.childrenMap().entrySet()) { // SnakeYAML supports both key and value comments. Add the comments on the key final Node value = represent(ent.getValue()); - final Node key = represent(String.valueOf(ent.getKey())); + final Node key = represent(ent.getKey()); key.setBlockComments(value.getBlockComments()); value.setBlockComments(Collections.emptyList());