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

Bug 332400

Summary: [evaluator] Initialization of OCL.Helper can be deferred until expression known to be != null
Product: [Modeling] OCL Reporter: Axel Uhl <eclipse>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse, ed
Version: unspecified   
Target Milestone: 3.1.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 329167    
Bug Blocks:    
Attachments:
Description Flags
Patch that moves Helper initialization to latest possible point ed: iplog+

Description Axel Uhl CLA 2010-12-12 16:27:48 EST
Build Identifier: CVS Head as of 2010-12-12

InvocationBehavior.getOperationBody(...) currently initializes an OCL.Helper which is not needed if the method returns due to expr==null a few lines later. The Helper creation/configuration can be moved to below the check for expr==null. Patch to be attached.

Reproducible: Always
Comment 1 Axel Uhl CLA 2010-12-12 16:39:12 EST
Created attachment 185033 [details]
Patch that moves Helper initialization to latest possible point
Comment 2 Ed Willink CLA 2010-12-13 03:26:25 EST
Depending on 329167 so that commit occurs at same time and avoids breaking a patch. (Feel free to include in any update to Bug 329167).
Comment 3 Axel Uhl CLA 2010-12-13 04:07:39 EST
(In reply to comment #2)
> Depending on 329167 so that commit occurs at same time and avoids breaking a
> patch. (Feel free to include in any update to Bug 329167).

For me, the patch cleanly applies on the latest CVS snapshot as of 2010-12-13 and does not depend on 329167. All tests are still green. I don't think there is a dependency on 329167 of any sort (which was part of the reason I extracted this as an entirely separate bug).
Comment 4 Ed Willink CLA 2010-12-13 05:39:12 EST
There is indeed no dependency, but there is a shared file.

When if two patch A and patch B share file C, then when patch A is committed, patch B is broken. Annoying. So, first choice; try to commit patches quickly, second choice; try to ovoid overlapping patches file-wise, third choice; try to batch up overlapping patches.
Comment 5 Ed Willink CLA 2010-12-15 12:50:38 EST
Thanks. Committed to head for 3.1.0M5.
Comment 6 Ed Willink CLA 2012-05-29 13:21:33 EDT
Closing all bugs resolved in Indigo.