You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/05/23 17:23:04 UTC
(causeway) 09/10: CAUSEWAY-3745: inlines setSuppressFlushing wherever called, and simplify
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-3745
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit ead2170ca7127db8034c52785b2491c5cdb266eb
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu May 23 18:17:36 2024 +0100
CAUSEWAY-3745: inlines setSuppressFlushing wherever called, and simplify
---
.../integration/repository/RepositoryServiceDefault.java | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/persistence/commons/src/main/java/org/apache/causeway/persistence/commons/integration/repository/RepositoryServiceDefault.java b/persistence/commons/src/main/java/org/apache/causeway/persistence/commons/integration/repository/RepositoryServiceDefault.java
index 3939b0af90..235a94418c 100644
--- a/persistence/commons/src/main/java/org/apache/causeway/persistence/commons/integration/repository/RepositoryServiceDefault.java
+++ b/persistence/commons/src/main/java/org/apache/causeway/persistence/commons/integration/repository/RepositoryServiceDefault.java
@@ -114,19 +114,12 @@ implements RepositoryService, HasMetaModelContext {
}
private void suppressFlushing() {
- setSuppressFlush(Boolean.TRUE);
+ this.suppressFlush.set(Boolean.TRUE);
}
private void resumeFlushing() {
- setSuppressFlush(Boolean.FALSE);
- }
-
- private void setSuppressFlush(final Boolean suppressFlush) {
- this.suppressFlush.set(suppressFlush);
- if (!suppressFlush) {
- this.suppressFlush.remove();
- transactionService.flushTransaction();
- }
+ this.suppressFlush.remove();
+ transactionService.flushTransaction();
}
@Override