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

Bug 141670

Summary: EcoreUtil.resolveProxy should try resolving object without demand load when resolving with demand load fails
Product: [Modeling] EMF Reporter: Ed Merks <Ed.Merks>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 104727    

Description Ed Merks CLA 2006-05-13 12:20:57 EDT
The code is changed to look like this, i.e., to add the catch and retry

  try
  {
    resolvedObject = resourceSet.getEObject(proxyURI, true);
  }
  catch (RuntimeException exception)
  {
    resolvedObject = resourceSet.getEObject(proxyURI, false);
  }

Since the resource may well throw an exception when being demand loaded, i.e., bad attribute in XML, but still provide all the other data that was recognized properly, it may well be the case and often is that a subsequent attempt to resolve the same proxy will be successful, so it seems much better to build that logic into the initial attempt at full resolution.
Comment 1 Ed Merks CLA 2006-05-13 12:28:01 EDT
The fix is committed to CVS.

This fix helps ensure that .genmodel/.ecore with slight problems (or even just from newer runtime versions) will be handled more gracefully during reconciliation.
Comment 2 Nick Boldt CLA 2006-05-15 23:31:52 EDT
Fixed in EMF 2.2.0RC4 (S200605151820).
Comment 3 Nick Boldt CLA 2008-01-28 16:47:16 EST
Move to verified as per bug 206558.