Elffuss BraidHub

kikocis/java-driver public

Merge pull request #330 from datastax/java710

Suppress Unexpected error in onFailure if cancelled (JAVA-710).
Changeset8cda1ec45abb67bf77c9b86c3a231803e8fa34200b6d7d859378a73239df266c
AuthorOlivier Michallat <olim7t@users.noreply.github.com> · 2015-06-18 10:49 +02:00
CommitterOlivier Michallat <olim7t@users.noreply.github.com> · 2015-06-18 10:49 +02:00
Parentsfd4d807e5ca8, f3143d46f735

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +2 −2
@@ -1550,7 +1550,7 @@
15501550 } catch (ExecutionException e) {
15511551 Throwable t = e.getCause();
15521552 // That future is not really supposed to throw unexpected exceptions
1553- if (!(t instanceof InterruptedException))
1553+ if (!(t instanceof InterruptedException) && !(t instanceof CancellationException))
15541554 logger.error("Unexpected error while marking node UP: while this shouldn't happen, this shouldn't be critical", t);
15551555 }
15561556
@@ -1821,7 +1821,7 @@
18211821 } catch (ExecutionException e) {
18221822 Throwable t = e.getCause();
18231823 // That future is not really supposed to throw unexpected exceptions
1824- if (!(t instanceof InterruptedException))
1824+ if (!(t instanceof InterruptedException) && !(t instanceof CancellationException))
18251825 logger.error("Unexpected error while adding node: while this shouldn't happen, this shouldn't be critical", t);
18261826 }
18271827