This avoids creating thousands of PackageNotFoundError instances when
resolving "normal" inter-document references which do not refer to
EPackages via nsURIs.
PackageNotFoundError are much cheaper to create than the previously
used PackageNotFoundException, but that's still a lot of garbage
instances to create, add into the resource.getErrors() list and never
use (or even clear).
In addition, in the context of Sirius Web, every instance will have
its own duplicate string representation of the failed "package" URI
because we get it from EObjectIDManager.getOrCreateId(EObject) which
invokes UUID.toString() and allocates a new (identical) String each
time.
This avoids creating thousands of PackageNotFoundError instances when resolving "normal" inter-document references which do not refer to EPackages via nsURIs.
PackageNotFoundError are much cheaper to create than the previously used PackageNotFoundException, but that's still a lot of garbage instances to create, add into the resource.getErrors() list and never use (or even clear).
In addition, in the context of Sirius Web, every instance will have its own duplicate string representation of the failed "package" URI because we get it from EObjectIDManager.getOrCreateId(EObject) which invokes UUID.toString() and allocates a new (identical) String each time.
Bug: https://github.com/eclipse-sirius/sirius-emf-json/issues/43 Signed-off-by: Pierre-Charles David pierre-charles.david@obeo.fr