Skip to content

Commit

Permalink
Add null arguments to MergeYaml usage
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Feb 7, 2025
1 parent 9b949d8 commit e7e6732
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private MergeYaml createMergeYamlVisitor() {
} else {
yaml.append(" ").append(value);
}
return new MergeYaml("$", yaml.toString(), true, null, null);
return new MergeYaml("$", yaml.toString(), true, null, null, null);
}

private static final Pattern scalarNeedsAQuote = Pattern.compile("[^a-zA-Z\\d\\s]*");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public TreeVisitor<?, ExecutionContext> getVisitor(Accumulator acc) {
source = new CoalescePropertiesVisitor<Integer>().visitDocuments(a.withDocuments(ListUtils.map((List<Yaml.Document>) a.getDocuments(), doc -> {
if (merged.compareAndSet(false, true) && FindProperty.find(doc, "spring.config.activate.on-profile", true).isEmpty()) {
return (Yaml.Document) new MergeYamlVisitor<Integer>(doc.getBlock(), b.getDocuments()
.get(0).getBlock(), true, null).visit(doc, 0, new Cursor(new Cursor(null, a), doc));
.get(0).getBlock(), true, null, null).visit(doc, 0, new Cursor(new Cursor(null, a), doc));
}
return doc;
})), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public Yaml visitDocuments(Yaml.Documents documents, ExecutionContext ctx) {
}, new YamlVisitor<ExecutionContext>() {
@Override
public Yaml visitDocuments(Yaml.Documents documents, ExecutionContext ctx) {
doAfterVisit(new MergeYaml("$.spring." + tool, "username: ${spring.datasource.username}", true, null, null).getVisitor());
doAfterVisit(new MergeYaml("$.spring." + tool, "password: ${spring.datasource.password}", true, null, null).getVisitor());
doAfterVisit(new MergeYaml("$.spring." + tool, "username: ${spring.datasource.username}", true, null, null, null).getVisitor());
doAfterVisit(new MergeYaml("$.spring." + tool, "password: ${spring.datasource.password}", true, null, null, null).getVisitor());
doAfterVisit(new CoalesceProperties().getVisitor());
return documents;
}
Expand Down

0 comments on commit e7e6732

Please sign in to comment.