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();