while (i.hasNext() && (!result || diagnostics == null))
while (i.hasNext() && (result || diagnostics != null))
  protected boolean doValidateContents(EObject eObject, DiagnosticChain diagnostics, Map context)  {    List eContents = eObject.eContents();    if (!eContents.isEmpty())    {      Iterator i = eContents.iterator();       EObject child = (EObject)i.next();      boolean result = validate(child, diagnostics, context);      while (i.hasNext() && (!result || diagnostics == null))      {        child = (EObject)i.next();        result &= validate(child, diagnostics, context);      }      return result;    }    else    {      return true;    }  }