Skip to content

Commit c4b9d61

Browse files
1 parent 4765334 commit c4b9d61

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,13 @@ public G.CompilationUnit visitCompilationUnit(G.CompilationUnit cu, ExecutionCon
124124
// Upgrade any previous runtimes to the most current 2.3.x version
125125
doAfterVisit(new org.openrewrite.gradle.UpgradeDependencyVersion(SUN_JAXB_RUNTIME_GROUP, SUN_JAXB_RUNTIME_ARTIFACT, "2.3.x", null).getVisitor());
126126
}
127-
g = (G.CompilationUnit) new org.openrewrite.gradle.ChangeDependency(GLASSFISH_JAXB_RUNTIME_GROUP, GLASSFISH_JAXB_RUNTIME_ARTIFACT,
128-
SUN_JAXB_RUNTIME_GROUP, SUN_JAXB_RUNTIME_ARTIFACT, "2.3.x", null, null
129-
).getVisitor().visitNonNull(g, ctx);
127+
g = (G.CompilationUnit) new ChangeDependency(GLASSFISH_JAXB_RUNTIME_GROUP, GLASSFISH_JAXB_RUNTIME_ARTIFACT, SUN_JAXB_RUNTIME_GROUP, SUN_JAXB_RUNTIME_ARTIFACT, "2.3.x", null, null, true).getVisitor().visitNonNull(g, ctx);
130128
} else {
131129
if (getAfterVisit().isEmpty()) {
132130
// Upgrade any previous runtimes to the most current 2.3.x version
133131
doAfterVisit(new org.openrewrite.gradle.UpgradeDependencyVersion(GLASSFISH_JAXB_RUNTIME_GROUP, GLASSFISH_JAXB_RUNTIME_ARTIFACT, "2.3.x", null).getVisitor());
134132
}
135-
g = (G.CompilationUnit) new org.openrewrite.gradle.ChangeDependency(SUN_JAXB_RUNTIME_GROUP, SUN_JAXB_RUNTIME_ARTIFACT,
136-
GLASSFISH_JAXB_RUNTIME_GROUP, GLASSFISH_JAXB_RUNTIME_ARTIFACT, "2.3.x", null, null
137-
).getVisitor().visitNonNull(g, ctx);
133+
g = (G.CompilationUnit) new ChangeDependency(SUN_JAXB_RUNTIME_GROUP, SUN_JAXB_RUNTIME_ARTIFACT, GLASSFISH_JAXB_RUNTIME_GROUP, GLASSFISH_JAXB_RUNTIME_ARTIFACT, "2.3.x", null, null, true).getVisitor().visitNonNull(g, ctx);
138134
}
139135
if(!acc.get()) {
140136
return g;

0 commit comments

Comments
 (0)