|
|
|
|
@ -30,6 +30,7 @@ import org.yaml.snakeyaml.constructor.BaseConstructor;
@@ -30,6 +30,7 @@ import org.yaml.snakeyaml.constructor.BaseConstructor;
|
|
|
|
|
import org.yaml.snakeyaml.constructor.Constructor; |
|
|
|
|
import org.yaml.snakeyaml.constructor.SafeConstructor; |
|
|
|
|
import org.yaml.snakeyaml.error.Mark; |
|
|
|
|
import org.yaml.snakeyaml.nodes.CollectionNode; |
|
|
|
|
import org.yaml.snakeyaml.nodes.MappingNode; |
|
|
|
|
import org.yaml.snakeyaml.nodes.Node; |
|
|
|
|
import org.yaml.snakeyaml.nodes.NodeTuple; |
|
|
|
|
@ -104,12 +105,15 @@ class OriginTrackedYamlLoader extends YamlProcessor {
@@ -104,12 +105,15 @@ class OriginTrackedYamlLoader extends YamlProcessor {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected Object constructObject(Node node) { |
|
|
|
|
if (node instanceof CollectionNode && ((CollectionNode<?>) node).getValue().isEmpty()) { |
|
|
|
|
return constructTrackedObject(node, super.constructObject(node)); |
|
|
|
|
} |
|
|
|
|
if (node instanceof ScalarNode) { |
|
|
|
|
if (!(node instanceof KeyScalarNode)) { |
|
|
|
|
return constructTrackedObject(node, super.constructObject(node)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (node instanceof MappingNode) { |
|
|
|
|
if (node instanceof MappingNode) { |
|
|
|
|
replaceMappingNodeKeys((MappingNode) node); |
|
|
|
|
} |
|
|
|
|
return super.constructObject(node); |
|
|
|
|
|