This is an automated email from the ASF dual-hosted git repository.

mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release24.09 by this push:
     new 5057fe3fc8 Keep a copied service's parameters separate and copy its 
permissions and notifications
5057fe3fc8 is described below

commit 5057fe3fc8735839c6e696b796ab60a59f08e6b6
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 c5fa289c29..b9fbbc5f7a 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
@@ -789,7 +789,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;
@@ -814,6 +813,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;

Reply via email to