|
Re: [Edapt] Adding a new EPackage cause NPE during Migration [message #1862358 is a reply to message #1852386] |
Tue, 28 November 2023 11:34 |
Roland Fahlbusch Messages: 5 Registered: November 2023 |
Junior Member |
|
|
I am having the same issue when initially creating the history.
The first entry of the CompositeChange is:
EPackage {B} has been created
Same as with the EPackage that was created before, which worked.
But then when migrating the element of the Change(CreateImpl) is an EObject instead of an EPackage and i get a similar NPE
How did you solve it?
*EDIT* FUrther analysis showed that:
@Override
public EObject getElement() {
if (element != null && element.eIsProxy()) {
final InternalEObject oldElement = (InternalEObject) element;
element = eResolveProxy(oldElement);
if (element != oldElement) {
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, HistoryPackage.NON_DELETE__ELEMENT,
oldElement, element));
}
}
}
return element;
}
the function eResolveProxy puts the EPackage correctly for A but an Proxy EObject for B. No idea why.
[Updated on: Tue, 28 November 2023 16:08] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01733 seconds