Skip to content

Commit

Permalink
Compatibility with rewrite 7.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Sep 22, 2022
1 parent a0befe7 commit 9bbfcc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected List<SourceFile> visit(List<SourceFile> before, ExecutionContext ctx)
return (SourceFile) new CoalescePropertiesVisitor<Integer>().visit(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).visit(doc, 0, new Cursor(new Cursor(null, a), doc));
.get(0).getBlock(), true, 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 @@ -85,8 +85,8 @@ protected TreeVisitor<?, ExecutionContext> getVisitor() {
return new YamlVisitor<ExecutionContext>() {
@Override
public Yaml visitDocuments(Yaml.Documents documents, ExecutionContext executionContext) {
doAfterVisit(new MergeYaml("$.spring." + tool,"username: ${spring.datasource.username}", true, null));
doAfterVisit(new MergeYaml("$.spring." + tool,"password: ${spring.datasource.password}", true, null));
doAfterVisit(new MergeYaml("$.spring." + tool,"username: ${spring.datasource.username}", true, null, null));
doAfterVisit(new MergeYaml("$.spring." + tool,"password: ${spring.datasource.password}", true, null, null));
doAfterVisit(new CoalesceProperties());
return documents;
}
Expand Down

0 comments on commit 9bbfcc3

Please sign in to comment.