Skip to content

Commit

Permalink
fixing usages of deprecated constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
nmck257 committed Jun 5, 2024
1 parent 3528009 commit 7e1130c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {
}
if (changed) {
maybeUpdateModel();
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, null, null, null).getVisitor());
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, (RemoveRedundantDependencyVersions.Comparator) null, null).getVisitor());
}
}
return t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {
doAfterVisit(visitor);
}
maybeUpdateModel();
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, null,
doAfterVisit(new RemoveRedundantDependencyVersions(null, null,
RemoveRedundantDependencyVersions.Comparator.GTE, null).getVisitor());
}
} catch (MavenDownloadingException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {

if (t != tag && PROJECT_MATCHER.matches(getCursor())) {
maybeUpdateModel();
doAfterVisit(new RemoveRedundantDependencyVersions(groupId, artifactId, null, null, null).getVisitor());
doAfterVisit(new RemoveRedundantDependencyVersions(groupId, artifactId, (RemoveRedundantDependencyVersions.Comparator) null, null).getVisitor());
}

return t;
Expand All @@ -189,11 +189,10 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {
TreeVisitor<Xml, ExecutionContext> upgradeManagedDependency = upgradeManagedDependency(tag, ctx, t);
if (upgradeManagedDependency != null) {
retainVersions();
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, null, null,
retainVersions).getVisitor());
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, (RemoveRedundantDependencyVersions.Comparator) null, retainVersions).getVisitor());
doAfterVisit(upgradeManagedDependency);
maybeUpdateModel();
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, null, null, null).getVisitor());
doAfterVisit(new RemoveRedundantDependencyVersions(null, null, (RemoveRedundantDependencyVersions.Comparator) null, null).getVisitor());
}
}
} catch (MavenDownloadingException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RemoveRedundantDependencyVersionsTest implements RewriteTest {

@Override
public void defaults(RecipeSpec spec) {
spec.recipe(new RemoveRedundantDependencyVersions(null, null, null, null, null));
spec.recipe(new RemoveRedundantDependencyVersions(null, null, (RemoveRedundantDependencyVersions.Comparator) null, null));
}

@Test
Expand Down Expand Up @@ -954,7 +954,7 @@ void givenNestedPomsWhenVersionDoesntMatchAnyDmThenKeepIt() {
@Test
void onlyIfVersionsMatchFalse() {
rewriteRun(
spec -> spec.recipe(new RemoveRedundantDependencyVersions(null, null, false, null, null)),
spec -> spec.recipe(new RemoveRedundantDependencyVersions(null, null, false, null)),
pomXml(
"""
<project>
Expand Down

0 comments on commit 7e1130c

Please sign in to comment.