You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2026/09/08 18:32:18 UTC
(ofbiz-framework) branch release24.09 updated: Fixed: duplicateCategoryEntities throws GroovyCastException (OFBIZ-13563)
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 40182649ef Fixed: duplicateCategoryEntities throws GroovyCastException (OFBIZ-13563)
40182649ef is described below
commit 40182649efc3523d68a3b307bfbec866ab2ee404
Author: Mridul Pathak <mr...@gmail.com>
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()