Closed eclipse-ocl-bot closed 1 month ago
By Christian Damus on Sep 08, 2008 11:17
(In reply to comment #0)
Perhaps it would be better if generateName was not static.
I agree. There's no good reason for this to be static. Uniqueness of variable names is only relevant within the scope of a particular expression.
By Christian Damus on Sep 10, 2008 09:10
Committed the change to make the generatorInt non-static. Also, the generateName method didn't need to be synchronized, and object synchronization to protect a static variable was useless, anyway.
Generation of names is not delegated up the environment hierarchy as name look-up is, because we do not create nested environments for nested iterator expressions, but only for nested constraint contexts.
By Ed Willink on May 27, 2011 02:48
Closing after over 18 months in resolved state.
| --- | --- | | Bugzilla Link | 246469 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Sep 06, 2008 16:25 EDT | | Modified | May 27, 2011 02:48 EDT | | Version | 1.2.0 | | Reporter | Ed Willink |
Description
Please add a static AbstractEnvironment.reset method so that JUnit tests can exhibit consistent behaviour with respect to the generated names, regardless of how many tests have been run.
Perhaps it would be better if generateName was not static.