Skip to content

Commit b5608dd

Browse files
committed
Fix AddDependency() constructor call
The `AddDependency()` of rewrite-maven now requires an additional parameter `acceptTransitive`. In this case we use `true` as the argument, since it is quite common for Spring Boot starters to depend on other starters. Related: openrewrite/rewrite#2932
1 parent 58f10a5 commit b5608dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ex
5656
a = a.withAnnotationType(a.getAnnotationType().withType(JavaType.buildType("org.springframework.boot.web.server.LocalServerPort")));
5757
maybeRemoveImport("org.springframework.boot.context.embedded.LocalServerPort");
5858
maybeAddImport("org.springframework.boot.web.server.LocalServerPort");
59-
doNext(new AddDependency("org.springframework.boot", "spring-boot-starter-web", "2.0.x", null, null, null, "org.springframework.boot.web.server.LocalServerPort", null, null, null, null));
59+
doNext(new AddDependency("org.springframework.boot", "spring-boot-starter-web", "2.0.x", null, null, null, "org.springframework.boot.web.server.LocalServerPort", null, null, null, null, true));
6060
}
6161
return a;
6262
}

0 commit comments

Comments
 (0)