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:31:32 UTC

[isis] branch master updated: ISIS-1931 target type for injection must be exactly one of the supported collection types

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 74d3417  ISIS-1931 target type for injection must be exactly one of the supported collection types
74d3417 is described below

commit 74d3417cb667f077b6ef2728827315785bd0623b
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Mar 25 21:31:30 2018 +0200

    ISIS-1931 target type for injection must be exactly one of the supported
    collection types
---
 .../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 f835a7f..b55e1e7 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
@@ -68,25 +68,25 @@ class CollectionHelper {
 	static <T> Collection<T> collectIntoUnmodifiableCompatibleWithCollectionType (
 			Class<?> typeOfCollection, Stream<? extends T> elementStream) {
 
-		if(SortedSet.class.isAssignableFrom(typeOfCollection)) {
+		if(SortedSet.class.equals(typeOfCollection)) {
 			return Collections.unmodifiableSortedSet(
 					elementStream.collect(Collectors.<T, SortedSet<T>>toCollection(TreeSet::new))
 			);
 		}
 		
-		if(Set.class.isAssignableFrom(typeOfCollection)) {
+		if(Set.class.equals(typeOfCollection)) {
 			return Collections.unmodifiableSet(
 					elementStream.collect(Collectors.<T, Set<T>>toCollection(HashSet::new))
 			);
 		}
 		
-		if(List.class.isAssignableFrom(typeOfCollection)) {
+		if(List.class.equals(typeOfCollection)) {
 			return Collections.unmodifiableList(
 					elementStream.collect(Collectors.<T, List<T>>toCollection(ArrayList::new))
 			);
 		}
 		
-		if(Collection.class.isAssignableFrom(typeOfCollection)) {
+		if(Collection.class.equals(typeOfCollection)) {
 			return Collections.unmodifiableCollection(
 					elementStream.collect(Collectors.toCollection(ArrayList::new))
 			);

-- 
To stop receiving notification emails like this one, please contact
ahuber@apache.org.