You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jaikiran <gi...@git.apache.org> on 2018/02/06 12:38:35 UTC
[GitHub] ant-ivy pull request #62: IVY-1572 - Check for Thread interruption while res...
Github user jaikiran commented on a diff in the pull request:
https://github.com/apache/ant-ivy/pull/62#discussion_r166282397
--- Diff: src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java ---
@@ -91,6 +91,9 @@ protected ResolvedResource findResourceUsingPatterns(ModuleRevisionId moduleRevi
Set<String> foundRevisions = new HashSet<>();
boolean dynamic = getSettings().getVersionMatcher().isDynamic(moduleRevision);
for (String pattern : patternList) {
+ if (Thread.currentThread().isInterrupted()) {
+ return null;
--- End diff --
@apupier , I don't think this is the best place to check the thread interruption, but I don't have a better suggestion right now, so unless someone objects, this change is probably fine. However, instead of returning null, can you please throw a (runtime) exception instead.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org