From 16e186684f8b709240d2d204f0d4c0460c64548c Mon Sep 17 00:00:00 2001 From: Brian Chan Date: Wed, 17 Jul 2024 08:26:09 +0530 Subject: [PATCH] LPD-26931 SF --- .../v3_0_1/test/SAPEntryUpgradeProcessTest.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/apps/portal-security/portal-security-service-access-policy-test/src/testIntegration/java/com/liferay/portal/security/service/access/policy/internal/upgrade/v3_0_1/test/SAPEntryUpgradeProcessTest.java b/modules/apps/portal-security/portal-security-service-access-policy-test/src/testIntegration/java/com/liferay/portal/security/service/access/policy/internal/upgrade/v3_0_1/test/SAPEntryUpgradeProcessTest.java index 59e3f647170571..7c183428872fec 100644 --- a/modules/apps/portal-security/portal-security-service-access-policy-test/src/testIntegration/java/com/liferay/portal/security/service/access/policy/internal/upgrade/v3_0_1/test/SAPEntryUpgradeProcessTest.java +++ b/modules/apps/portal-security/portal-security-service-access-policy-test/src/testIntegration/java/com/liferay/portal/security/service/access/policy/internal/upgrade/v3_0_1/test/SAPEntryUpgradeProcessTest.java @@ -49,14 +49,12 @@ public void testUpgradeProcessSystemRestClientTemplateObjectSAPEntry() Company company = CompanyTestUtil.addCompany(); - SAPEntry systemRESTClientTemplateObjectSAPEntry = - _sapEntryLocalService.fetchSAPEntry( - company.getCompanyId(), - _sapConfiguration.systemRESTClientTemplateObjectSAPEntryName()); + SAPEntry sapEntry = _sapEntryLocalService.fetchSAPEntry( + company.getCompanyId(), + _sapConfiguration.systemRESTClientTemplateObjectSAPEntryName()); - if (systemRESTClientTemplateObjectSAPEntry != null) { - _sapEntryLocalService.deleteSAPEntry( - systemRESTClientTemplateObjectSAPEntry); + if (sapEntry != null) { + _sapEntryLocalService.deleteSAPEntry(sapEntry); } _runUpgrade();