Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langer2017-01-24 16:25:46 +0000
committerAxel RICHARD2017-02-10 14:11:29 +0000
commite8071982936d413c1f5a408bff7912b46cc203f4 (patch)
treed78890dbc84c39b2fa349a6b6f785c138200a89b /plugins/org.eclipse.emf.compare.tests/src/org/eclipse
parentd8af08b53762443f3d8d43306963014493a0c643 (diff)
downloadorg.eclipse.emf.compare-e8071982936d413c1f5a408bff7912b46cc203f4.tar.gz
org.eclipse.emf.compare-e8071982936d413c1f5a408bff7912b46cc203f4.tar.xz
org.eclipse.emf.compare-e8071982936d413c1f5a408bff7912b46cc203f4.zip
Take advantage of multiple type catch of Java 7
Change-Id: I5db80b37aeefa101beaad6515408b54a92342e1b Signed-off-by: Philip Langer <planger@eclipsesource.com>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java8
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java4
4 files changed, 7 insertions, 19 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java
index 41987741f..1f08a407d 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java
@@ -84,9 +84,7 @@ public abstract class AbstractInputData {
resource = resourceSet.createResource(uri);
stream = fileURL.openStream();
resource.load(stream, Collections.emptyMap());
- } catch (IOException e) {
- // return null
- } catch (WrappedException e) {
+ } catch (IOException | WrappedException e) {
// return null
} finally {
if (stream != null) {
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java
index b6544d11a..b2fdacad4 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java
@@ -16,8 +16,8 @@ import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.common.util.Monitor;
import org.eclipse.emf.compare.Comparison;
-import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.conflict.IConflictDetector;
+import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.diff.DefaultDiffEngine;
import org.eclipse.emf.compare.diff.DiffBuilder;
import org.eclipse.emf.compare.diff.IDiffEngine;
@@ -112,9 +112,7 @@ public class ConflictStatement extends Statement {
IMatchEngine engine = null;
try {
engine = engineClass.newInstance();
- } catch (InstantiationException e) {
- // Swallow : we'll create a default engine instead.
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
@@ -142,9 +140,7 @@ public class ConflictStatement extends Statement {
IDiffEngine engine = null;
try {
engine = engineClass.newInstance();
- } catch (InstantiationException e) {
- // Swallow : we'll create a default engine instead.
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java
index 2d1cd568d..c98586d89 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java
@@ -105,9 +105,7 @@ public class DiffStatement extends Statement {
IMatchEngine engine = null;
try {
engine = engineClass.newInstance();
- } catch (InstantiationException e) {
- // Swallow : we'll create a default engine instead.
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
@@ -135,9 +133,7 @@ public class DiffStatement extends Statement {
IDiffEngine engine = null;
try {
engine = engineClass.newInstance();
- } catch (InstantiationException e) {
- // Swallow : we'll create a default engine instead.
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java
index d5d2c5fa8..626a0effb 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java
@@ -110,9 +110,7 @@ public class MatchStatement extends Statement {
IMatchEngine engine = null;
try {
engine = engineClass.newInstance();
- } catch (InstantiationException e) {
- // Swallow : we'll create a default engine instead.
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {

Back to the top