Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Commit 5910a55

Browse files
authored
Merge pull request #27 from nabam/patch-1
Catch UncheckedExecutionException in cache lookups
2 parents 296dbab + fe9512d commit 5910a55

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/com/spotify/dns/CachingLookupFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.google.common.base.Preconditions;
2020
import com.google.common.cache.Cache;
2121
import com.google.common.cache.CacheBuilder;
22+
import com.google.common.util.concurrent.UncheckedExecutionException;
2223

2324
import org.xbill.DNS.Lookup;
2425

@@ -58,6 +59,8 @@ public Lookup call() {
5859
);
5960
} catch (ExecutionException e) {
6061
throw new DnsException(e);
62+
} catch (UncheckedExecutionException e) {
63+
throw new DnsException(e);
6164
}
6265
}
6366
}

0 commit comments

Comments
 (0)