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 2021/05/04 11:44:14 UTC

[isis] branch master updated: ISIS-2642: active MM tests; also add some java-doc

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 ac9fada  ISIS-2642: active MM tests; also add some java-doc
ac9fada is described below

commit ac9fada77c2608c28661460920c159af02e202e3
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue May 4 13:43:56 2021 +0200

    ISIS-2642: active MM tests; also add some java-doc
---
 .../isis/commons/internal/collections/_Collections.java  | 16 +++++++++++-----
 .../domainmodel/DomainModelTest_usingGoodDomain.java     |  3 +--
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/commons/src/main/java/org/apache/isis/commons/internal/collections/_Collections.java b/commons/src/main/java/org/apache/isis/commons/internal/collections/_Collections.java
index 9685e6a..de050bd 100644
--- a/commons/src/main/java/org/apache/isis/commons/internal/collections/_Collections.java
+++ b/commons/src/main/java/org/apache/isis/commons/internal/collections/_Collections.java
@@ -274,6 +274,10 @@ public final class _Collections {
 
     // -- ELEMENT TYPE INFERENCE
 
+    /**
+     * Optionally returns the inferred element type for given {@code param}, based on whether
+     * it represents a collection and inference is possible.
+     */
     public static Optional<Class<?>> inferElementType(final @NonNull Parameter param) {
         val parameterType = param.getType();
         
@@ -287,6 +291,11 @@ public final class _Collections {
         return Optional.empty();
     }
     
+    /**
+     * Optionally returns the inferred element type for given {@code method}'s return type, 
+     * based on whether
+     * it represents a collection and inference is possible.
+     */
     public static Optional<Class<?>> inferElementType(final @NonNull Method method) {
         
         val returnType = method.getReturnType();
@@ -302,11 +311,8 @@ public final class _Collections {
     }
     
     /**
-     * If the {@code field} represents a collection then returns the inferred element type 
-     * for this collection (if any).
-     *
-     * @param field
-     * @return inferred type or null if inference fails
+     * Optionally returns the inferred element type for given {@code field}, based on whether
+     * it represents a collection and inference is possible.
      */
     public static Optional<Class<?>> inferElementType(final @NonNull Field field) {
         
diff --git a/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingGoodDomain.java b/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingGoodDomain.java
index 2f4cd8e..34934b1 100644
--- a/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingGoodDomain.java
+++ b/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingGoodDomain.java
@@ -22,7 +22,6 @@ import java.util.stream.Stream;
 
 import javax.inject.Inject;
 
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
@@ -278,7 +277,7 @@ class DomainModelTest_usingGoodDomain {
 
     }
     
-    @Test @Disabled("ISIS-2641,ISIS-2642")
+    @Test
     void elementTypes_shouldBeIntrospected_whenNotConcrete() {
         
         val vmSpec = specificationLoader.loadSpecification(ProperElementTypeVm.class,