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 2021/07/26 11:46:36 UTC
[isis] 01/01: ISIS-2785: filters out inherited ObjectNamedFacet ...
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2785
in repository https://gitbox.apache.org/repos/asf/isis.git
commit b9711bbef2ceb4aa3274c4b4c39e414f42e7e42a
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jul 26 12:46:10 2021 +0100
ISIS-2785: filters out inherited ObjectNamedFacet ...
... when insatlling an ObjectNamedFacetSynthesized. Otherwise we see that the name comes (or can come from) the superclass' ObjectNamedFacets
---
.../postprocessors/all/i18n/SynthesizeObjectNamingPostProcessor.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/all/i18n/SynthesizeObjectNamingPostProcessor.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/all/i18n/SynthesizeObjectNamingPostProcessor.java
index bd86596..b3bbe2f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/all/i18n/SynthesizeObjectNamingPostProcessor.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/all/i18n/SynthesizeObjectNamingPostProcessor.java
@@ -58,6 +58,7 @@ extends ObjectSpecificationPostProcessorAbstract {
val topRank = objectSpecification
.lookupFacet(ObjectNamedFacet.class)
+ .filter(x -> x.getFacetHolder() == objectSpecification) // insist is for this objectSpec (not a superclass')
.flatMap(Facet::getSharedFacetRanking)
.map(facetRanking->facetRanking.getTopRank(ObjectNamedFacet.class))
.orElse(Can.empty())