arturobernalg opened a new pull request, #162: URL: https://github.com/apache/maven-dependency-tree/pull/162
DefaultDependencyNode never overrode equals()/hashCode(), so nodes compared by identity even when describing the same dependency across different builds of a tree. equals()/hashCode() are now based on the node's artifact coordinates only, not parent/children, avoiding recursion through those back-references. getChildren() returned the internal mutable list, letting callers corrupt the graph by adding/removing/replacing children behind the node's back. It now returns an unmodifiable view. BuildingDependencyNodeVisitor relied on mutating that list directly (parentNode.getChildren().add(newNode)) while cloning a tree, so it now accumulates each node's children internally and assigns them with setChildren() once the node is fully visited. Fixes #138 To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
