From 0bd50fba9063856ef13ad1e0b401aea84c95c6dd Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 8 Jan 2025 09:49:53 +0100 Subject: [PATCH] remove setFlusMode(COMMIT) - belongs to SpringBoot 3.4.x upgrade and revert jvmArgs via += --- build.gradle | 4 ++-- .../asset/validators/HsUnixUserHostingAssetValidator.java | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c561bae9..6f254509 100644 --- a/build.gradle +++ b/build.gradle @@ -112,8 +112,8 @@ tasks.withType(JavaCompile) { // Configure tests tasks.named('test') { useJUnitPlatform() - jvmArgs += '-Duser.language=en' - jvmArgs += '-Duser.country=US' + jvmArgs '-Duser.language=en' + jvmArgs '-Duser.country=US' } // OpenAPI Source Code Generation diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsUnixUserHostingAssetValidator.java b/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsUnixUserHostingAssetValidator.java index 8cf6b75d..024866c2 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsUnixUserHostingAssetValidator.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsUnixUserHostingAssetValidator.java @@ -6,7 +6,6 @@ import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType; import net.hostsharing.hsadminng.hs.validation.PropertiesProvider; import jakarta.persistence.EntityManager; -import jakarta.persistence.FlushModeType; import java.util.regex.Pattern; import static net.hostsharing.hsadminng.hs.validation.BooleanProperty.booleanProperty; @@ -54,7 +53,6 @@ class HsUnixUserHostingAssetValidator extends HostingAssetEntityValidator { } private static Integer computeUserId(final EntityManager em, final PropertiesProvider propertiesProvider) { - em.setFlushMode(FlushModeType.COMMIT); final Object result = em.createNativeQuery("SELECT nextval('hs_hosting.asset_unixuser_system_id_seq')", Integer.class) .getSingleResult(); return (Integer) result;