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 2011/02/07 21:39:52 UTC

svn commit: r1068116 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java

Author: mrisaliti
Date: Mon Feb  7 20:39:51 2011
New Revision: 1068116

URL: http://svn.apache.org/viewvc?rev=1068116&view=rev
Log:
Remove compilation warnings of an unused variable in ImageManagementServices (OFBIZ-4102)

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1068116&r1=1068115&r2=1068116&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Mon Feb  7 20:39:51 2011
@@ -307,7 +307,8 @@ public class ImageManagementServices {
     public static Map<String, Object> removeImageFileForImageManagement(DispatchContext dctx, Map<String, ? extends Object> context){
         String contentId = (String) context.get("contentId");
         String objectInfo = (String) context.get("objectInfo");
-        String productId = (String) context.get("productId");
+        //FIXME can be removed ?
+        // String productId = (String) context.get("productId");
         try {
             if (UtilValidate.isNotEmpty(contentId)) {
                 String imageServerPath = FlexibleStringExpander.expandString(UtilProperties.getPropertyValue("catalog", "image.server.path"), context);
@@ -425,7 +426,9 @@ public class ImageManagementServices {
                     try {
                         ImageIO.write((RenderedImage) bufNewImg, imgExtension, new File(imageServerPath + "/" + newFilePathPrefix + filenameToUse));
                         File deleteFile = new File(imageServerPath + "/products/management/" + filenameToUse);
-                        boolean check = deleteFile.delete();
+                        deleteFile.delete();
+                        //FIXME can be removed ?
+                        //  boolean check = deleteFile.delete();
                     } catch (IllegalArgumentException e) {
                         String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_parameter_is_null", locale) + e.toString();
                         Debug.logError(errMsg, module);
@@ -529,7 +532,8 @@ public class ImageManagementServices {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         Delegator delegator = dctx.getDelegator();
         Locale locale = (Locale) context.get("locale");
-        String imageFilenameFormat = UtilProperties.getPropertyValue("catalog", "image.filename.format");
+        //FIXME can be removed ?
+        // String imageFilenameFormat = UtilProperties.getPropertyValue("catalog", "image.filename.format");
         String imageServerPath = FlexibleStringExpander.expandString(UtilProperties.getPropertyValue("catalog", "image.server.path"), context);
         
         // Create content for thumbnail