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/04/09 09:10:17 UTC

[isis] branch master updated: ISIS-2602: GroupIdAndName: comments

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 bbb0826  ISIS-2602: GroupIdAndName: comments
bbb0826 is described below

commit bbb0826956a30f40fd05788b5cf7dcabd57de975
Author: ahuber@apache.org <ah...@luna>
AuthorDate: Fri Apr 9 11:10:01 2021 +0200

    ISIS-2602: GroupIdAndName: comments
---
 .../core/metamodel/facets/members/layout/group/GroupIdAndName.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/layout/group/GroupIdAndName.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/layout/group/GroupIdAndName.java
index 6025d2c..82cbba6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/layout/group/GroupIdAndName.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/layout/group/GroupIdAndName.java
@@ -108,6 +108,11 @@ implements
     
     // -- HELPER
     
+    /* 
+     * if id is missing tries to infer it;
+     * if name is missing tries to infer it;
+     * if cannot reason about a usable id, returns Optional.empty()
+     */
     private static Optional<GroupIdAndName> inferIfOneMissing(
             final @Nullable String _id, 
             final @Nullable String _name) {
@@ -126,7 +131,7 @@ implements
             if(inferredId.isEmpty()) {
                 return Optional.empty(); // cannot infer a usable id, so don't create a LayoutGroupFacet down the line
             }
-            return Optional.of(GroupIdAndName.of(inferIdFromName(name), name));
+            return Optional.of(GroupIdAndName.of(inferredId, name));
         } else if(isNameUnspecified) {
             val inferredName = inferNameFromId(id);
             return Optional.of(GroupIdAndName.of(id, inferredName));