brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alasdairhodge <>
Subject [GitHub] incubator-brooklyn pull request: BROOKLYN-72: Fix deletion of OSGi...
Date Tue, 09 Dec 2014 16:20:25 GMT
Github user alasdairhodge commented on a diff in the pull request:
    --- Diff: utils/common/src/main/java/brooklyn/util/os/ ---
    @@ -231,13 +231,18 @@ public static DeletionResult deleteRecursively(File dir) {
         public static DeletionResult deleteRecursively(File dir, boolean skipSafetyChecks)
    +        if (dir==null) return new DeletionResult(null, true, null);
             try {
    -            if (dir==null) return new DeletionResult(null, true, null);
                 if (!skipSafetyChecks) checkSafe(dir);
                 return new DeletionResult(dir, true, null);
    +        } catch (IllegalArgumentException e) {
    +            // See exception reported in
    +            // If another thread is changing the contents of the directory at the same
time as
    +            // we delete it, then can get this exception. Try three times, and then give
    +            return new DeletionResult(dir, false, e);
    --- End diff --
    "Try three times"? Code above retries for one second.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message