This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 455723cbf4 Keep a copied service's parameters separate and copy its
permissions and notifications
455723cbf4 is described below
commit 455723cbf46321330bead9e251e82047e71c1f8b
Author: Mridul Pathak <[email protected]>
AuthorDate: Sat Oct 31 18:30:18 2026 +0530
Keep a copied service's parameters separate and copy its permissions and
notifications
The ModelService copy constructor, used by runSync, runSyncIgnore and
runAsync when a transaction timeout or a new transaction is requested, reused
the cached service's parameter map and put the copy's cloned parameters into
it, so the cached service started returning one call's clones. It also left out
the required permissions, the notifications and the deprecation details, so
those calls skipped the service's required-permissions check and sent no
notifications. The copy now has its [...]
---
.../src/main/java/org/apache/ofbiz/service/ModelService.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
index fe0fedd1e3..eb82ea0393 100644
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
@@ -773,7 +773,6 @@ public class ModelService extends AbstractMap<String,
Object> implements Seriali
this.debug = model.debug;
this.semaphoreWait = model.semaphoreWait;
this.semaphoreSleep = model.semaphoreSleep;
- this.contextInfo = model.contextInfo;
this.definitionLocation = model.definitionLocation;
this.description = model.description;
this.engineName = model.engineName;
@@ -797,6 +796,13 @@ public class ModelService extends AbstractMap<String,
Object> implements Seriali
}
this.implServices = model.implServices;
this.overrideParameters = model.overrideParameters;
+ this.permissionGroups = new LinkedList<>(model.permissionGroups);
+ if (model.notifications != null) {
+ this.notifications = new LinkedList<>(model.notifications);
+ }
+ this.deprecatedUseInstead = model.deprecatedUseInstead;
+ this.deprecatedSince = model.deprecatedSince;
+ this.deprecatedReason = model.deprecatedReason;
this.inheritedParameters = model.inheritedParameters();
this.internalGroup = model.internalGroup;
this.hideResultInLog = model.hideResultInLog;