Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370091

Summary: Java Problem: Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED DUPLICATE QA Contact:
Severity: trivial    
Priority: P3    
Version: 2.8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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 ***