You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/08/21 01:59:48 UTC

[GitHub] [maven-resolver] belingueres commented on a change in pull request #39: [MRESOLVER-93] - PathRecordingDependencyVisitor to handle 3 cycles

belingueres commented on a change in pull request #39: [MRESOLVER-93] - PathRecordingDependencyVisitor to handle 3 cycles
URL: https://github.com/apache/maven-resolver/pull/39#discussion_r315972295
 
 

 ##########
 File path: maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/visitor/PathRecordingDependencyVisitor.java
 ##########
 @@ -101,6 +96,7 @@ public boolean visitEnter( DependencyNode node )
     {
         boolean accept = filter == null || filter.accept( node, parents );
 
+        boolean hasDuplicateNodeInParent = parents.contains( node );
 
 Review comment:
   If parent.contains(node) performance is a problem, you could maintain both the Stack and IdentityHasMap to store the nodes, and replace the parent.contains(node) with visited.containsKey(node) which is an O(1) operation.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services