[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.emft] Re: [EMF Compare] resourceURISimilarity fails with empty URI

Hi Laurent,

I'm parsing text files (not XML) and generating models from those files. The resulting EMF model is not to be persisted so the EObject is not associated with a resource. Actually I saw I needed to add it to a resource before using EMF Compare. What would you recommend ? Create a dummy resource for any object I want to compare - with a valid URI ? Or rise an enhancement request to allow comparison with EObject not linked to a resource ?

Best regards,
Guillaume

laurent Goubet wrote:

Hi Guillaume,

Can't say this is "by design", it's more that we didn't protect the code against empty URI resources since most of the code assumes your compared resources are contained within a resource set, and they have legal URIs.

Do you have a legit use case where we should be able to compare resources with no URI? If yes, then please raise a bug with the information and (if possible) sample models for which the code should be functional.

Laurent Goubet
Obeo

Guillaume Chatelet a écrit :
Maybe it's 'by design' but if you try to compare resources with no or empty URI, the resourceURISimilarity method fails with an ArrayIndexOutOfBoundException on line :

final String referenceName = reference[reference.length - 1];

Best regards,
Guillaume