Bug 496638 - Duplicate FQN checking is missing from ViatraQueryEngine
Summary: Duplicate FQN checking is missing from ViatraQueryEngine
Status: RESOLVED FIXED
Alias: None
Product: Viatra
Classification: Modeling
Component: Query (show other bugs)
Version: 1.3.0   Edit
Hardware: PC Windows NT
: P3 normal
Target Milestone: 1.3.0RC   Edit
Assignee: Abel Hegedus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-23 07:35 EDT by Abel Hegedus CLA
Modified: 2016-06-28 09:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abel Hegedus CLA 2016-06-23 07:35:06 EDT
Since the ViatraQueryEngine only uses QuerySpecification objects as keys, it is possible to have multiple queries with the same FQN loaded into an engine. 

In addition, the getMatcher(String fqn) method does not look at already loaded queries and simply assumes that a query with the given FQN that is different from the one returned by the registry has not been initialized.
Comment 1 Eclipse Genie CLA 2016-06-23 07:39:54 EDT
New Gerrit change created: https://git.eclipse.org/r/75830
Comment 2 Abel Hegedus CLA 2016-06-28 06:06:05 EDT
We discussed that it is by design that the engine uses the QuerySpecification objects as keys and does not care about fully qualified names.

See gerrit change:
- I have updated the JavaDoc of the ViatraQueryEngine.getMatcher(String fqn) method to clarify that the query specification registry is used to get the specification for the given FQN.
- I have also added a test case to ensure that any change in this behavior is detected.
Comment 4 Abel Hegedus CLA 2016-06-28 09:00:36 EDT
Fixed in master.