sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-tenant] 07/10: SLING-3376 - TenantProvider passes tenant with old state to TenantCustomizer
Date Tue, 07 Nov 2017 10:17:00 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.tenant-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tenant.git

commit e748798cd39851057b84b0e12b62a00f040811ad
Author: Amit Gupta <amitgupt@apache.org>
AuthorDate: Thu Feb 6 05:34:01 2014 +0000

    SLING-3376 - TenantProvider passes tenant with old state to TenantCustomizer
    
    Applied the patch. Thanks Roland for the patch.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/tenant@1565082
13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/tenant/internal/TenantProviderImpl.java   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/java/org/apache/sling/tenant/internal/TenantProviderImpl.java b/src/main/java/org/apache/sling/tenant/internal/TenantProviderImpl.java
index e52c884..5c48496 100644
--- a/src/main/java/org/apache/sling/tenant/internal/TenantProviderImpl.java
+++ b/src/main/java/org/apache/sling/tenant/internal/TenantProviderImpl.java
@@ -381,6 +381,12 @@ public class TenantProviderImpl implements TenantProvider, TenantManager
{
                     Resource tenantRes = getTenantResource(resolver, tenant.getId());
                     if (tenantRes != null) {
                         updater.update(tenantRes.adaptTo(ModifiableValueMap.class));
+
+                        //refresh so that customizer gets a refreshed tenant instance
+                        if (tenant instanceof TenantImpl) {
+                            ((TenantImpl) tenant).loadProperties(tenantRes);
+                        }
+
                         customizeTenant(tenantRes, tenant);
                         resolver.commit();
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message