Bug 521899 [refactoring] Use multi-catch
Change-Id: If83f7a7965be24e330d60cd390165a4d44a31af7
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java
index 149a9ae..e255b85 100644
--- a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java
+++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java
@@ -850,9 +850,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
manager.join(first, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -920,9 +918,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
manager.join(first, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -990,9 +986,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
manager.join(first, canceller);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -1049,9 +1043,7 @@
try {
manager.setLockListener(lockListener);
manager.join(family, new FussyProgressMonitor());
- } catch (OperationCanceledException e) {
- fail("4.99", e);
- } catch (InterruptedException e) {
+ } catch (OperationCanceledException | InterruptedException e) {
fail("4.99", e);
} finally {
manager.setLockListener(null);
@@ -1067,9 +1059,7 @@
manager.join(new Object(), monitor);
monitor.sanityCheck();
monitor.assertUsedUp();
- } catch (OperationCanceledException e) {
- fail("4.99", e);
- } catch (InterruptedException e) {
+ } catch (OperationCanceledException | InterruptedException e) {
fail("4.99", e);
}
}
@@ -1154,9 +1144,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
manager.join(third, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobGroupTest.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobGroupTest.java
index 22e23c2..576a3ba 100644
--- a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobGroupTest.java
+++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobGroupTest.java
@@ -437,9 +437,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
firstJobGroup.join(0, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -511,9 +509,7 @@
long start = System.currentTimeMillis();
firstJobGroup.join(timeout, null);
duration[0] = System.currentTimeMillis() - start;
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -577,9 +573,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
firstJobGroup.join(0, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -647,9 +641,7 @@
TestBarrier.waitForStatus(status, 0, TestBarrier.STATUS_WAIT_FOR_RUN);
status[0] = TestBarrier.STATUS_RUNNING;
firstJobGroup.join(0, canceler);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
status[0] = TestBarrier.STATUS_DONE;
@@ -764,9 +756,7 @@
barrier.setStatus(TestBarrier.STATUS_START);
try {
jobGroup.join(0, monitor);
- } catch (OperationCanceledException e) {
- // ignore
- } catch (InterruptedException e) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
// Check the progress reporting on monitor.
@@ -858,9 +848,7 @@
barrier.setStatus(TestBarrier.STATUS_RUNNING);
try {
jobGroup.join(0, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
barrier.setStatus(TestBarrier.STATUS_WAIT_FOR_DONE);
@@ -933,9 +921,7 @@
barrier.setStatus(TestBarrier.STATUS_RUNNING);
try {
jobGroup.join(0, null);
- } catch (OperationCanceledException e1) {
- // ignore
- } catch (InterruptedException e2) {
+ } catch (OperationCanceledException | InterruptedException e) {
// ignore
}
barrier.setStatus(TestBarrier.STATUS_WAIT_FOR_DONE);