Skip to content

Commit 1294ad7

Browse files
committed
Upgrade to rewrite 6.0.0
1 parent 6cc75c0 commit 1294ad7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public Collection<SourceFile> generate() {
140140
"@ConfigurationProperties(\"" + String.join(".", commonPrefix) + "\")\n" +
141141
"public class " + className + " {\n" +
142142
"}\n";
143-
Path parentDir = Paths.get(springBootApplication.getSourcePath()).getParent();
143+
Path parentDir = Paths.get(springBootApplication.getSourcePath().toString()).getParent();
144144
Path sourcePath;
145145
if(parentDir == null) {
146146
sourcePath = Paths.get(className + ".java");
@@ -150,7 +150,7 @@ public Collection<SourceFile> generate() {
150150
J.CompilationUnit cu = fillConfigurationPropertiesTypeAttribution(
151151
jp.reset().parse(newClassText)
152152
.get(0)
153-
.withSourcePath(sourcePath.toString()));
153+
.withSourcePath(sourcePath.toUri()));
154154
generatedClasses.put(className, cu);
155155
return cu;
156156

0 commit comments

Comments
 (0)