diff --git a/rewrite-yaml/src/main/java/org/openrewrite/yaml/MergeYamlVisitor.java b/rewrite-yaml/src/main/java/org/openrewrite/yaml/MergeYamlVisitor.java index 67b62bdb333..142e09876d4 100644 --- a/rewrite-yaml/src/main/java/org/openrewrite/yaml/MergeYamlVisitor.java +++ b/rewrite-yaml/src/main/java/org/openrewrite/yaml/MergeYamlVisitor.java @@ -156,7 +156,7 @@ private Mapping mergeMapping(Yaml.Mapping m1, Yaml.Mapping m2, P p, Cursor curso if (!mergedEntries.isEmpty() && it.getValue() instanceof Yaml.Scalar && hasLineBreak(mergedEntries.get(0), 2)) { return it.withPrefix(lineSeparator() + grabAfterFirstLineBreak(mergedEntries.get(0))); } - return shouldAutoFormat ? MergeYamlVisitor.this.autoFormat(it, p, cursor) : it; + return shouldAutoFormat ? autoFormat(it, p, cursor) : it; })); if (m1.getEntries().size() < mutatedEntries.size() && !getCursor().isRoot()) {