ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaikiran <...@git.apache.org>
Subject [GitHub] ant-ivy pull request #62: IVY-1572 - Check for Thread interruption while res...
Date Tue, 06 Feb 2018 12:38:35 GMT
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


Mime
View raw message