| Summary: | Warning: Statement unnecessarily nested within else clause | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Eike Stepper <stepper> | ||||
| Component: | Core | Assignee: | Ed Merks <Ed.Merks> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | ||||||
| Version: | 2.8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Please consult the project settings (falling back to the workspace preferences) to determine what compiler setting is used to create problem markers for unnecessary else clauses. *** Bug 370091 has been marked as a duplicate of this bug. *** The enhancement is committed to master: http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=ca5d1a30b0c5828a1df2f948771e2710d3541592 The changes are available in Kepler. |
Created attachment 206495 [details] Fix The generator produces warnings in the generated switch classes: protected T doSwitch(EClass theEClass, EObject theEObject) { if (theEClass.eContainer() == modelPackage) { return doSwitch(theEClass.getClassifierID(), theEObject); } else // HERE!!! { List<EClass> eSuperTypes = theEClass.getESuperTypes(); return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); } } The attached patch should fix that.