As a workaround we now use the following code at all the places where such lazy resolution accours:
/**
* Tries to get rid of the problematic null pointers because there is only a
* lazy resolution
*
* @param eObject
* the object that may be a lazy resource.
*/
def void resolveEObject(EObject eObject) {
if (eObject != null) {
try {
EcoreUtil2::resolveLazyCrossReferences(eObject.eResource(), null);
} catch (NullPointerException e) {
// LOG.warn("a eObject could not be resolved: " + eObject, e);
}
}
}
The log statement is currently commented out, because it is sometimes called during linking and there are lazy ressources expected.
[Updated on: Tue, 22 January 2013 07:13] by Moderator