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

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

commit cfee3063b1559f3eecd4e4c0fb75174748678381
Author: Jacques Le Roux <[email protected]>
AuthorDate: Fri Sep 19 10:27:37 2025 +0200

    Improved: improves ImageManagementServices code (OFBIZ-13292)
    
    It's about better code and information in log when uploading several images.
---
 .../ofbiz/product/imagemanagement/ImageManagementServices.java      | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java
 
b/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java
index b2d0f98504..60bbe3d7f5 100644
--- 
a/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java
+++ 
b/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java
@@ -87,7 +87,7 @@ public class ImageManagementServices {
         Locale locale = (Locale) context.get("locale");
 
         if (UtilValidate.isNotEmpty(uploadFileName)) {
-            Debug.logInfo("================== This is about file: " + 
uploadFileName +" ==================", MODULE);
+            Debug.logInfo("================== This is about file: " + 
uploadFileName + " ==================", MODULE);
             String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog",
                     "image.management.path", delegator), context);
             String imageServerUrl = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog",
@@ -181,9 +181,7 @@ public class ImageManagementServices {
                     return 
ServiceUtil.returnError(UtilProperties.getMessage(RES_ERROR,
                             "ProductImageViewUnableWriteBinaryData", 
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
                 }
-            }
-            // Scale Image in different sizes
-            else {
+            } else { // Scale Image in different sizes
                 fileToCheck = imageServerPath + "/" + productId + "/" + 
imageName;
                 File fileOriginal = new File(fileToCheck);
                 fileOriginal = checkExistsImage(fileOriginal);

Reply via email to