Skip to content

Commit 50bcc70

Browse files
Dealing with extra parameter for AddProperty (#784)
1 parent a94d2cf commit 50bcc70

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/openrewrite/java/spring/AddSpringProperty.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public boolean isAcceptable(SourceFile sourceFile, ExecutionContext ctx) {
9191
if (t instanceof Yaml.Documents && sourcePathMatches(((SourceFile) t).getSourcePath(), ctx)) {
9292
t = createMergeYamlVisitor().getVisitor().visit(t, ctx);
9393
} else if (t instanceof Properties.File && sourcePathMatches(((SourceFile) t).getSourcePath(), ctx)) {
94-
t = new AddProperty(property, value, comment, null).getVisitor().visit(t, ctx);
94+
t = new AddProperty(property, value, comment, null, null).getVisitor().visit(t, ctx);
9595
}
9696
return t;
9797
}

src/main/java/org/openrewrite/java/spring/boot2/MigrateDatabaseCredentialsForToolProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public Properties visitFile(Properties.File file, ExecutionContext ctx) {
5757
}, new PropertiesVisitor<ExecutionContext>() {
5858
@Override
5959
public Properties visitFile(Properties.File file, ExecutionContext ctx) {
60-
doAfterVisit(new AddProperty("spring." + tool + ".username", "${spring.datasource.username}", null, null).getVisitor());
61-
doAfterVisit(new AddProperty("spring." + tool + ".password", "${spring.datasource.password}", null, null).getVisitor());
60+
doAfterVisit(new AddProperty("spring." + tool + ".username", "${spring.datasource.username}", null, null, null).getVisitor());
61+
doAfterVisit(new AddProperty("spring." + tool + ".password", "${spring.datasource.password}", null, null, null).getVisitor());
6262
return file;
6363
}
6464
});

0 commit comments

Comments
 (0)