Issue with cached Helpers [message #1860621] |
Tue, 22 August 2023 08:01 |
Yves BERNARD Messages: 146 Registered: July 2014 |
Senior Member |
|
|
I have defined a helper that has UML!Element as a context, no input parameter and that return a Boolean value.
It works fine with any input element kind except Association Classes. In that case, the following exception is raised:
org.eclipse.m2m.atl.emftvm.util.VMException: org.eclipse.m2m.atl.emftvm.util.DuplicateEntryException:
Superkeys
org.eclipse.emf.ecore.impl.EClassImpl@5f18a74d (name: Class) (instanceClassName: null) (abstract: false, interface: false) and
org.eclipse.emf.ecore.impl.EClassImpl@5b0d50a7 (name: Association) (instanceClassName: null) (abstract: false, interface: false)
both have an entry in
{...(map content)...}
If I rewrite the helper so that it has no context and take the element to be evaluated has an input parameter, it works fine with any kind of element, Association Classes as well.
So it looks like the problem comes from the map that the first version of the helper uses for caching its results and that does not work well with Association Classes.
Did you ever experience a similar issue and if so, did you find a workaround?
Thanks.
Yves
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01983 seconds