Use modern language features in tests

This commit is contained in:
Sam Brannen
2022-02-03 14:50:10 +01:00
parent 82a2544918
commit f8a5a8d7be
91 changed files with 577 additions and 1059 deletions

View File

@@ -125,16 +125,7 @@ public class ConcurrencyThrottleInterceptorTests {
try {
this.proxy.exceptional(this.ex);
}
catch (RuntimeException ex) {
if (ex == this.ex) {
logger.debug("Expected exception thrown", ex);
}
else {
// should never happen
ex.printStackTrace();
}
}
catch (Error err) {
catch (RuntimeException | Error err) {
if (err == this.ex) {
logger.debug("Expected exception thrown", err);
}