From 168bb6fc562595446ce079fa1f4f79909f359c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lourdes=20Fern=C3=A1ndez=20Besada?= Date: Fri, 5 Apr 2024 13:14:18 +0200 Subject: [PATCH] LPD-22494 As we can't validate the data here because performance, executes the insert in each iteration to catch the exception if occurs. In that way we prevent from fail the Upgrade Process due some inconsistent data. --- .../upgrade/v3_4_1/LayoutFriendlyURLEntryUpgradeProcess.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/friendly-url/friendly-url-service/src/main/java/com/liferay/friendly/url/internal/upgrade/v3_4_1/LayoutFriendlyURLEntryUpgradeProcess.java b/modules/apps/friendly-url/friendly-url-service/src/main/java/com/liferay/friendly/url/internal/upgrade/v3_4_1/LayoutFriendlyURLEntryUpgradeProcess.java index 445be632cd71cb..01ba0aec4ed54f 100644 --- a/modules/apps/friendly-url/friendly-url-service/src/main/java/com/liferay/friendly/url/internal/upgrade/v3_4_1/LayoutFriendlyURLEntryUpgradeProcess.java +++ b/modules/apps/friendly-url/friendly-url-service/src/main/java/com/liferay/friendly/url/internal/upgrade/v3_4_1/LayoutFriendlyURLEntryUpgradeProcess.java @@ -131,7 +131,7 @@ protected void doUpgrade() throws Exception { preparedStatement.setLong(9, classNameId); preparedStatement.setLong(10, plid); - preparedStatement.addBatch(); + preparedStatement.executeUpdate(); } } catch (Exception exception) {