Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests/model/derived/util/DerivedSwitch.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/model/derived/util/DerivedSwitch.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/model/derived/util/DerivedSwitch.java b/plugins/org.eclipse.emf.cdo.tests/model/derived/util/DerivedSwitch.java
index 3277d7b6b1..2c34447aef 100644
--- a/plugins/org.eclipse.emf.cdo.tests/model/derived/util/DerivedSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.tests/model/derived/util/DerivedSwitch.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
@@ -75,11 +75,9 @@ public class DerivedSwitch<T>
{
return doSwitch(theEClass.getClassifierID(), theEObject);
}
- else
- {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
+
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
}
/**
@@ -98,9 +96,13 @@ public class DerivedSwitch<T>
DerivedClass derivedClass = (DerivedClass)theEObject;
T result = caseDerivedClass(derivedClass);
if (result == null)
+ {
result = caseBaseClass(derivedClass);
+ }
if (result == null)
+ {
result = defaultCase(theEObject);
+ }
return result;
}
default:

Back to the top