You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/03/04 10:54:22 UTC
[isis] branch master updated: ISIS-1841: reworks _Multimaps to use
lambdas, avoid compiler type inference issue with JDK's javac
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 6ecf347 ISIS-1841: reworks _Multimaps to use lambdas, avoid compiler type inference issue with JDK's javac
6ecf347 is described below
commit 6ecf347128e82099cc295d8a9d5c5e3c43bf6a72
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Mar 4 10:54:15 2018 +0000
ISIS-1841: reworks _Multimaps to use lambdas, avoid compiler type inference issue with JDK's javac
---
.../org/apache/isis/applib/internal/collections/_Multimaps.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/internal/collections/_Multimaps.java b/core/applib/src/main/java/org/apache/isis/applib/internal/collections/_Multimaps.java
index 02493fc..3de53ec 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/internal/collections/_Multimaps.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/internal/collections/_Multimaps.java
@@ -207,21 +207,21 @@ public class _Multimaps {
* @return HashMap of ArrayLists
*/
public static <K, V> ListMultimap<K, V> newListMultimap(){
- return newListMultimap(HashMap::new, ArrayList::new);
+ return newListMultimap(() -> new HashMap<K, List<V>>(), () -> new ArrayList<V>());
}
/**
* @return HashMap of HashSets
*/
public static <K, V> SetMultimap<K, V> newSetMultimap(){
- return newSetMultimap(HashMap::new, HashSet::new);
+ return newSetMultimap(() -> new HashMap<K, Set<V>>(), () -> new HashSet<V>());
}
/**
* @return HashMap of HashMaps
*/
public static <K1, K2, V> MapMultimap<K1, K2, V> newMapMultimap(){
- return newMapMultimap(HashMap::new, HashMap::new);
+ return newMapMultimap(() -> new HashMap<K1, Map<K2, V>>(), () -> new HashMap<K2, V>());
}
--
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.