summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2016-08-19 22:57:30 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2016-10-24 21:49:30 +0900
commit3212bcd4f2c0dc791a99af97ee98df70746f2306 (patch)
tree5b8a60ab8b42ed338a96189f0c799358d46a0c84
parentbc37211df3cc7b7516974142d78232197c49ce29 (diff)
Remove usage of deprecated Throwables methods
The propagate and propagateIfPossible methods are deprecated in Guava 20. Replace them with the recommended alternatives. Change-Id: I8aacba415a15655850c9d2e7ba8bd207db930460
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java5
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
index 06cbe33..b20f8eb 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -220,7 +220,8 @@ public class Destination {
stateLog.error(String.format("source project %s not available", project),
err, states);
} catch (Exception e) {
- throw Throwables.propagate(e);
+ Throwables.throwIfUnchecked(e);
+ throw new RuntimeException(e);
}
return false;
}
@@ -238,7 +239,7 @@ public class Destination {
stateLog.error(String.format("source project %s not available", project),
err, states);
} catch (Exception e) {
- Throwables.propagateIfPossible(e);
+ Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
return false;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
index a251832..99b28e3 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -286,7 +286,7 @@ class PushOne implements ProjectRunnable, CanceledWhileRunning {
}
}).call();
} catch (Exception e) {
- Throwables.propagateIfPossible(e);
+ Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
} finally {
statesCleanUp();