Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370091 - Java Problem: Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally
Summary: Java Problem: Statement unnecessarily nested within else clause. The correspo...
Status: CLOSED DUPLICATE of bug 362981
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.8.0   Edit
Hardware: PC Windows 7
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 02:04 EST by Eike Stepper CLA
Modified: 2012-01-30 03:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2012-01-30 02:04:32 EST
The generated reflective getter of model implementation classes, e.g. XyzImpl.eGet(int, boolean, boolean) should not use an else keyword:

  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case ManifestPackage.SECTION__ATTRIBUTES:
        if (coreType) return getAttributes();
---->  else return getAttributes().map();
      case ManifestPackage.SECTION__ENTRY:
        return getEntry();
      case ManifestPackage.SECTION__MAIN:
        return isMain();
    }
    return super.eGet(featureID, resolve, coreType);
  }
Comment 1 Eike Stepper CLA 2012-01-30 03:02:06 EST

*** This bug has been marked as a duplicate of bug 362981 ***