Bug 536680

Summary: Use IMultiLookup instead of Map<Key, Collection<Value>> where possible
Product: [Modeling] Viatra Reporter: Zoltan Ujhelyi <zoltan.ujhelyi>
Component: CommonAssignee: Project Inbox <viatra-inbox>
Status: CLOSED MOVED QA Contact:
Severity: normal    
Priority: P3 CC: gabor.bergmann
Version: 2.1.0   
Target Milestone: 2.6.0M1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Zoltan Ujhelyi CLA 2018-07-04 07:11:19 EDT
When we have reduced the usage of Guava, we have lost the ability to reuse the Multimap interface. We have replaced those usages with Map<Key, Collection<Value>> but that behaves differently in case of missing keys: Guava Multimaps ensure that get never returns null; while the same is not true for the replacement.

I propose to have a way to have a generic null-safe multimap implementation to avoid issues like bug 536647 (and that was not the first) in the future.
Comment 1 Gabor Bergmann CLA 2018-07-04 07:16:41 EDT
We do have IMultiLookup, but its usage has not yet been introduced everywhere. Probably the long-term solution would be to increase usage of this already existing facility.
Comment 2 Zoltan Ujhelyi CLA 2018-07-04 07:20:48 EDT
Fair point, the first candidate would be the valueToFeatureMap field in EMFBaseIndexInstanceStore... :)
Comment 3 Zoltan Ujhelyi CLA 2018-12-06 16:46:25 EST
Another candidate would be FixedPriorityConflictResolver#priorityBuckets, see bug 542490 for direct motivation.
Comment 4 Zoltan Ujhelyi CLA 2019-05-27 07:49:26 EDT
Bugzilla cleanup.
Comment 5 Zoltan Ujhelyi CLA 2019-11-20 05:51:39 EST
Postponing issues to the next release.
Comment 6 Zoltan Ujhelyi CLA 2020-05-18 13:04:09 EDT
Postponing issues that will not be solved for version 2.5.
Comment 7 Zoltan Ujhelyi CLA 2020-11-23 08:30:57 EST
Mass postponing of issues to the 2.6 timeframe.
Comment 8 Eclipse Webmaster CLA 2024-03-11 23:35:08 EDT
This issue has been migrated to https://github.com/eclipse-viatra/org.eclipse.viatra/issues .