You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2023/11/27 12:05:37 UTC

Re: [PR] [MRESOLVER-321] Make collection and visiting interruptable [maven-resolver]

gnodet commented on code in PR #380:
URL: https://github.com/apache/maven-resolver/pull/380#discussion_r1406063530


##########
maven-resolver-api/src/main/java/org/eclipse/aether/graph/DefaultDependencyNode.java:
##########
@@ -286,6 +286,9 @@ public void setData(Object key, Object value) {
     }
 
     public boolean accept(DependencyVisitor visitor) {
+        if (Thread.currentThread().isInterrupted()) {
+            throw new RuntimeException("Thread interrupted");

Review Comment:
   We need a way for the caller to know that the exception was caused by the thread being interrupted.
   At least `new RuntimeException(new InterruptedException("Thread interrupted"))` ?



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org