summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2016-08-25 00:21:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-08-25 00:21:42 +0000
commit5cac325cca171205130c53df8b3ee9ab3b115979 (patch)
treec543d4b44decf06129b4bb86656162b32fa903a8
parent75af77375b34133e85f3ee5f1b19dac19d3f3837 (diff)
parent960ebfc840b9a63c9ee9ddf1c9ff33ff7fbebebd (diff)
Merge "Revert "Remove usage of to-be-deprecated Throwables methods""
-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, 3 insertions, 4 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 b20f8eb..06cbe33 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -220,8 +220,7 @@ public class Destination {
stateLog.error(String.format("source project %s not available", project),
err, states);
} catch (Exception e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
+ throw Throwables.propagate(e);
}
return false;
}
@@ -239,7 +238,7 @@ public class Destination {
stateLog.error(String.format("source project %s not available", project),
err, states);
} catch (Exception e) {
- Throwables.throwIfUnchecked(e);
+ Throwables.propagateIfPossible(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 47867fa..48586eb 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.throwIfUnchecked(e);
+ Throwables.propagateIfPossible(e);
throw new RuntimeException(e);
} finally {
statesCleanUp();