cstamas commented on PR #1563:
URL: https://github.com/apache/maven/pull/1563#issuecomment-2160632765
Went thru resolver cobase, and we have 5 copies of this method:
```java
private static Throwable getCause(SomeType result) {
Throwable cause = null;
if (result != null && !result.getExceptions().isEmpty()) {
cause = result.getExceptions().get(0);
}
return cause;
}
```
And these methods are bad, as they blindly choose 1st exception as "cause"
in various scenarios. They are in classes:
* VersionResolutionException
* DependencyCollectionException
* ArtifactDescriptorException
* VersionRangeResolutionException
* (fifth is in ArtifactResolutionException but it is modified, is not
copy-pasta of this)
--
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]