Bug 536680 - Use IMultiLookup instead of Map<Key, Collection<Value>> where possible
Summary: Use IMultiLookup instead of Map<Key, Collection<Value>> where possible
Status: CLOSED MOVED
Alias: None
Product: Viatra
Classification: Modeling
Component: Common (show other bugs)
Version: 2.1.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal
Target Milestone: 2.6.0M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-04 07:11 EDT by Zoltan Ujhelyi CLA
Modified: 2024-03-11 23:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 .