gnodet-bot commented on code in PR #2186:
URL: https://github.com/apache/maven-resolver/pull/2186#discussion_r4219875668


##########
maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactResolutionException.java:
##########
@@ -133,9 +133,37 @@ private static String getSmartMessage(List<? extends 
ArtifactResult> results) {
             buffer.append(": ").append(cause.getMessage());
         }
 
+        String additionalFailures = getAdditionalFailures(results, cause);
+        if (!additionalFailures.isEmpty()) {
+            buffer.append(" (additional failures: 
").append(additionalFailures).append(")");
+        }
+
         return buffer.toString();
     }
 
+    private static String getAdditionalFailures(List<? extends ArtifactResult> 
results, Throwable primaryCause) {
+        List<String> failures = new ArrayList<>();

Review Comment:
   💡 **Nit (carried over):** Prefer `List<String>` over `ArrayList<String>` — 
program to the interface rather than the implementation. Since 
`Collections.sort` accepts any `List`, this works as-is:
   
   ```suggestion
           List<String> failures = new ArrayList<>();
   ```



-- 
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]

Reply via email to