summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2016-08-19 22:57:30 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2016-08-19 22:57:49 +0900
commit9a8395846516d65158b1b2bb59deb9aa6537e820 (patch)
tree0c335b2bd9ba7f6e22e740e8d4bbac3bc98c124a
parentc5123d6a5604cc740d6f42485235c0d3ec141c4e (diff)
Remove usage of to-be-deprecated Throwables methods
The propagate and propagateIfPossible methods will be deprecated in Guava 20. Replace them with the recommended alternatives. Change-Id: I11d8adcae3000189c16f60179e02a79440ef99d6
-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 48586eb..47867fa 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -285,7 +285,7 @@ class PushOne implements ProjectRunnable, CanceledWhileRunning {
}
}).call();
} catch (Exception e) {
- Throwables.propagateIfPossible(e);
+ Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
} finally {
statesCleanUp();