From b0013ecc7c141169e9be4bde5a1f1410294db604 Mon Sep 17 00:00:00 2001 From: "daniel.solis" Date: Wed, 16 Oct 2024 14:15:23 -0600 Subject: [PATCH] #28362 : change check for live and working version in findDefaultHost method --- .../portlets/contentlet/business/HostFactoryImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotCMS/src/main/java/com/dotmarketing/portlets/contentlet/business/HostFactoryImpl.java b/dotCMS/src/main/java/com/dotmarketing/portlets/contentlet/business/HostFactoryImpl.java index 2abf97e92462..66588404ef5d 100644 --- a/dotCMS/src/main/java/com/dotmarketing/portlets/contentlet/business/HostFactoryImpl.java +++ b/dotCMS/src/main/java/com/dotmarketing/portlets/contentlet/business/HostFactoryImpl.java @@ -58,6 +58,8 @@ import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.concurrent.ConcurrentUtils; /** @@ -816,7 +818,7 @@ public Optional findDefaultHost(final String contentTypeId, final String c } defaultHost = new Host(APILocator.getContentletAPI().find(workingInode, APILocator.systemUser(), false)); this.siteCache.add(defaultHost); - if (UtilMethods.isSet(liveInode) && !workingInode.equals(liveInode)) { + if (UtilMethods.isSet(liveInode) && !StringUtils.equals(workingInode,liveInode)) { final Host liveDefaultHost = new Host(APILocator.getContentletAPI().find( liveInode, APILocator.systemUser(), false)); this.siteCache.add(liveDefaultHost);