You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/03/25 19:23:46 UTC
[isis] branch master updated: ISIS-1931 fixes build failure
This is an automated email from the ASF dual-hosted git repository.
ahuber 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 8a4f358 ISIS-1931 fixes build failure
8a4f358 is described below
commit 8a4f3589442c934d075296d0da689c567f8267ba
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Mar 25 21:23:44 2018 +0200
ISIS-1931 fixes build failure
javac does not manage type inference correctly here, so we make the type
parameters explicit
---
.../org/apache/isis/core/metamodel/services/CollectionHelper.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/CollectionHelper.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/CollectionHelper.java
index b66b66c..f835a7f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/CollectionHelper.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/CollectionHelper.java
@@ -66,23 +66,23 @@ class CollectionHelper {
* @throws IllegalArgumentException if the given typeOfCollection is not supported
*/
static <T> Collection<T> collectIntoUnmodifiableCompatibleWithCollectionType (
- Class<?> typeOfCollection, Stream<T> elementStream) {
+ Class<?> typeOfCollection, Stream<? extends T> elementStream) {
if(SortedSet.class.isAssignableFrom(typeOfCollection)) {
return Collections.unmodifiableSortedSet(
- elementStream.collect(Collectors.toCollection(TreeSet::new))
+ elementStream.collect(Collectors.<T, SortedSet<T>>toCollection(TreeSet::new))
);
}
if(Set.class.isAssignableFrom(typeOfCollection)) {
return Collections.unmodifiableSet(
- elementStream.collect(Collectors.toCollection(HashSet::new))
+ elementStream.collect(Collectors.<T, Set<T>>toCollection(HashSet::new))
);
}
if(List.class.isAssignableFrom(typeOfCollection)) {
return Collections.unmodifiableList(
- elementStream.collect(Collectors.toCollection(ArrayList::new))
+ elementStream.collect(Collectors.<T, List<T>>toCollection(ArrayList::new))
);
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.