Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] resourceURISimilarity fails with empty URI
[EMF Compare] resourceURISimilarity fails with empty URI [message #484400] Mon, 07 September 2009 11:35 Go to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
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
Re: [EMF Compare] resourceURISimilarity fails with empty URI [message #484401 is a reply to message #484400] Mon, 07 September 2009 11:47 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040308000700000102030400
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

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
Re: [EMF Compare] resourceURISimilarity fails with empty URI [message #484402 is a reply to message #484401] Mon, 07 September 2009 11:57 Go to previous message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
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
>>
Re: [EMF Compare] resourceURISimilarity fails with empty URI [message #621359 is a reply to message #484400] Mon, 07 September 2009 11:47 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040308000700000102030400
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

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
Re: [EMF Compare] resourceURISimilarity fails with empty URI [message #621360 is a reply to message #484401] Mon, 07 September 2009 11:57 Go to previous message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
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
>>
Previous Topic:[EMF Compare] resourceURISimilarity fails with empty URI
Next Topic:[EMF Compare] Similarity in ordered list
Goto Forum:
  


Current Time: Sat Jul 27 01:14:10 GMT 2024

Powered by FUDForum. Page generated in 0.03961 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top