Skip to content

Commit

Permalink
Merge pull request #351 from knrc/tidy
Browse files Browse the repository at this point in the history
Tidy up code
  • Loading branch information
hboutemy authored Apr 30, 2023
2 parents 38ac77b + 471c170 commit d1550ad
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ public CollectResult collectDependencies(final RepositorySystemSession session,
throws DependencyCollectionException {
collectResult = delegate.collectDependencies(session, request);
final DependencyNode root = collectResult.getRoot();
root.accept(new TreeDependencyVisitor( new DependencyVisitor()
{
root.accept(new TreeDependencyVisitor(new DependencyVisitor() {
@Override
public boolean visitEnter(final DependencyNode node)
{
if (root != node)
try {
final ArtifactResult resolveArtifact = resolveArtifact(session, new ArtifactRequest(node));
node.setArtifact(resolveArtifact.getArtifact());
} catch (ArtifactResolutionException e) {}
if (root != node) {
try {
final ArtifactResult resolveArtifact = resolveArtifact(session, new ArtifactRequest(node));
node.setArtifact(resolveArtifact.getArtifact());
} catch (ArtifactResolutionException e) {} // ignored
}
return true;
}

Expand All @@ -80,7 +80,7 @@ public boolean visitLeave(final DependencyNode dependencyNode)
{
return true;
}
} ) );
}));

return collectResult;
}
Expand Down

0 comments on commit d1550ad

Please sign in to comment.