caiwei-ebay commented on a change in pull request #144:
URL: https://github.com/apache/maven-resolver/pull/144#discussion_r794154922
##########
File path:
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java
##########
@@ -407,27 +401,30 @@ private void processDependency( Args args, Results
results, List<RemoteRepositor
Artifact originalArtifact = dependency.getArtifact().setVersion(
version.toString() );
Dependency d = dependency.setArtifact( originalArtifact );
- ArtifactDescriptorRequest descriptorRequest =
createArtifactDescriptorRequest( args, repositories, d );
+ ArtifactDescriptorRequest descriptorRequest =
+ createArtifactDescriptorRequest( args,
context.repositories, d );
final ArtifactDescriptorResult descriptorResult =
- getArtifactDescriptorResult( args, results, noDescriptor, d,
descriptorRequest );
+ noDescriptor
+ ? new ArtifactDescriptorResult( descriptorRequest )
+ : resolveCachedArtifactDescriptor( args.pool,
descriptorRequest, args.session,
+ context.withDependency( d ), results );
+
if ( descriptorResult != null )
{
d = d.setArtifact( descriptorResult.getArtifact() );
- DependencyNode node = args.nodes.top();
-
- int cycleEntry = args.nodes.find( d.getArtifact() );
- if ( cycleEntry >= 0 )
+ int cycleEntry = find( context.parents, d.getArtifact() );
+ if ( cycleEntry != -1 )
Review comment:
They are totally the same, I reverted the change. Thanks for pointing
out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]