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 b470f794dd Fixed: duplicateCategoryEntities throws GroovyCastException 
(OFBIZ-13563)
b470f794dd is described below

commit b470f794ddec006dbb5ebfe8c08d99b729d5a039
Author: Mridul Pathak <[email protected]>
AuthorDate: Tue Sep 8 18:58:32 2026 +0530

    Fixed: duplicateCategoryEntities throws GroovyCastException (OFBIZ-13563)
    
    copyCategoryEntities() was declared with a Map return type, but its last
    statement (delegator.storeAll(entitiesToStore)) implicitly returns an int
    (the number of rows stored). Groovy coerces the returned value to the
    declared type, throwing a GroovyCastException. The return value is unused
    by all call sites, so the method is declared void, which prevents Groovy
    from attempting the coercion.
---
 .../apache/ofbiz/product/product/category/CategoryServicesScript.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy
 
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy
index 94f01a84e4..4a13381c01 100644
--- 
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy
+++ 
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy
@@ -353,7 +353,7 @@ Map duplicateCategoryEntities() {
  * copies all entities of entityName with a productCategoryId to a new entity 
with a productCategoryIdTo,
  * filtering them by a timestamp passed in to validDate if necessary
  */
-Map copyCategoryEntities(String entityName, String productCategoryId, String 
productCategoryIdTo, Timestamp validDate) {
+void copyCategoryEntities(String entityName, String productCategoryId, String 
productCategoryIdTo, Timestamp validDate) {
     EntityQuery query = from(entityName).where('productCategoryId', 
productCategoryId)
     if (validDate) {
         query.filterByDate()

Reply via email to