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/07/28 15:26:13 UTC

[isis] branch master updated: ISIS-1488: always exclude Bob/Clob from property change publishing

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 851c646  ISIS-1488: always exclude Bob/Clob from property change publishing
851c646 is described below

commit 851c646ed5bd2ba38ef6bfb4e216671f254477bf
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Jul 28 17:25:59 2021 +0200

    ISIS-1488: always exclude Bob/Clob from property change publishing
---
 .../EntityPropertyChangePublishingPolicyFacet.java            | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/entitychangepublishing/EntityPropertyChangePublishingPolicyFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/entitychangepublishing/EntityPropertyChangePublishingPolicyFacet.java
index a409ca2..529bb50 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/entitychangepublishing/EntityPropertyChangePublishingPolicyFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/entitychangepublishing/EntityPropertyChangePublishingPolicyFacet.java
@@ -20,10 +20,13 @@
 package org.apache.isis.core.metamodel.facets.properties.property.entitychangepublishing;
 
 import org.apache.isis.applib.annotation.Publishing;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.applib.value.Clob;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 
 import lombok.NonNull;
+import lombok.val;
 
 /**
  * Indicates whether a property should be excluded from entity change publishing (auditing).
@@ -45,10 +48,18 @@ public interface EntityPropertyChangePublishingPolicyFacet extends Facet {
     }
 
     static boolean isExcludedFromPublishing(final @NonNull OneToOneAssociation property) {
+
+        val typeOf = property.getSpecification().getCorrespondingClass();
+        if(Blob.class.equals(typeOf)
+                || Clob.class.equals(typeOf)) {
+            return true; //XXX ISIS-1488, always exclude Bob/Clob from property change publishing
+        }
+
         return property
                 .lookupFacet(EntityPropertyChangePublishingPolicyFacet.class)
                 .map(EntityPropertyChangePublishingPolicyFacet::isPublishingVetoed)
                 .orElse(false);
     }
 
+
 }