eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[evaluator] Initialization of OCL.Helper can be deferred until expression known to be != null #626

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 332400 | | Status | CLOSED FIXED | | Importance | P3 enhancement | | Reported | Dec 12, 2010 16:27 EDT | | Modified | May 29, 2012 13:21 EDT | | Depends on | 329167 | | Reporter | Axel Uhl |

Description

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

eclipse-ocl-bot commented 1 month ago

By Axel Uhl on Dec 12, 2010 16:39

Created attachment 185033 Patch that moves Helper initialization to latest possible point

:notepad_spiral: patch

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Dec 13, 2010 03:26

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).

eclipse-ocl-bot commented 1 month ago

By Axel Uhl on Dec 13, 2010 04:07

(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).

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Dec 13, 2010 05:39

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.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Dec 15, 2010 12:50

Thanks. Committed to head for 3.1.0M5.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 29, 2012 13:21

Closing all bugs resolved in Indigo.