| 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: | Core | Assignee: | 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 | ||
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. Fixed in EMF 2.2.0RC4 (S200605151820). Move to verified as per bug 206558. |
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.