ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lekt...@apache.org
Subject svn commit: r1418650 - in /ofbiz/trunk: applications/manufacturing/src/org/ofbiz/manufacturing/bom/ applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ applications/order/src/org/ofbiz/order/order/ applications/order/src/org/ofbiz/order/...
Date Sat, 08 Dec 2012 12:06:05 GMT
Author: lektran
Date: Sat Dec  8 12:06:01 2012
New Revision: 1418650

URL: http://svn.apache.org/viewvc?rev=1418650&view=rev
Log:
Remove a bunch of unnecessary casts

Modified:
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java
    ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
    ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java
    ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
    ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java
    ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/WebPosEvents.java
    ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java Sat
Dec  8 12:06:01 2012
@@ -160,7 +160,7 @@ public class BOMNode {
                     if (productFeatures != null) {
                         for (int j = 0; j < productFeatures.size(); j++) {
                             feature = productFeatures.get(j);
-                            if (ruleCondition.equals((String)feature.get("productFeatureId")))
{
+                            if (ruleCondition.equals(feature.get("productFeatureId"))) {
                                 ruleSatisfied = true;
                                 break;
                             }

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
(original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Sat Dec  8 12:06:01 2012
@@ -942,7 +942,7 @@ public class ProductionRunServices {
                             Map<String, Object> inMap = UtilMisc.<String, Object>toMap("userLogin",
userLogin, "workEffortId", productionRunId);
                             inMap.put("costComponentCalcId", costComponentCalc.getString("costComponentCalcId"));
                             inMap.put("costComponentTypeId", "ACTUAL_" + productCostComponentCalc.getString("costComponentTypeId"));
-                            inMap.put("costUomId", (String)partyAccountingPreference.get("baseCurrencyUomId"));
+                            inMap.put("costUomId", partyAccountingPreference.get("baseCurrencyUomId"));
                             inMap.put("cost", productCostAdjustment);
                             dispatcher.runSync("createCostComponent", inMap);
                         }
@@ -2101,9 +2101,9 @@ public class ProductionRunServices {
                                     "fromDate", component.getTimestamp("fromDate"));
                             serviceContext.put("quantity", requiredQuantity);
                             if (componentsLocation != null) {
-                                serviceContext.put("locationSeqId", (String)componentsLocation.get("locationSeqId"));
-                                serviceContext.put("secondaryLocationSeqId", (String)componentsLocation.get("secondaryLocationSeqId"));
-                                serviceContext.put("failIfItemsAreNotAvailable", (String)componentsLocation.get("failIfItemsAreNotAvailable"));
+                                serviceContext.put("locationSeqId", componentsLocation.get("locationSeqId"));
+                                serviceContext.put("secondaryLocationSeqId", componentsLocation.get("secondaryLocationSeqId"));
+                                serviceContext.put("failIfItemsAreNotAvailable", componentsLocation.get("failIfItemsAreNotAvailable"));
                             }
                             serviceContext.put("userLogin", userLogin);
                             Map<String, Object> resultService = dispatcher.runSync("issueProductionRunTaskComponent",


Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sat
Dec  8 12:06:01 2012
@@ -1841,7 +1841,7 @@ public class OrderReturnServices {
                                             if (ServiceUtil.isError(invReqResult)) {
                                                 Debug.logError("Error calling isStoreInventoryAvailable
service, result is: " + invReqResult, module);
                                             } else {
-                                                inventoryAvailable = "Y".equals((String)
invReqResult.get("available"));
+                                                inventoryAvailable = "Y".equals(invReqResult.get("available"));
                                             }
                                         } catch (GenericServiceException e) {
                                             Debug.logError(e, "Fatal error calling inventory
checking services: " + e.toString(), module);
@@ -1961,7 +1961,7 @@ public class OrderReturnServices {
                                                 }
 
                                                 if (priceResult.get("listPrice") != null)
{
-                                                    newItem.set("unitListPrice", (BigDecimal)priceResult.get("listPrice"));
+                                                    newItem.set("unitListPrice", priceResult.get("listPrice"));
                                                 }
 
                                                 BigDecimal repairUnitPrice = null;

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat
Dec  8 12:06:01 2012
@@ -236,7 +236,7 @@ public class ShoppingCart implements Ite
         // clone the additionalPartyRoleMap
         this.additionalPartyRole = new HashMap<String, List<String>>();
         for (Map.Entry<String, List<String>> me : cart.additionalPartyRole.entrySet())
{
-            this.additionalPartyRole.put(me.getKey(), new LinkedList<String>((Collection<String>)
me.getValue()));
+            this.additionalPartyRole.put(me.getKey(), new LinkedList<String>(me.getValue()));
         }
 
         // clone the groups

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Sat Dec  8 12:06:01 2012
@@ -1990,7 +1990,7 @@ public class ShoppingCartEvents {
                     appendOrderItemMap.put("shipGroupSeqId", shipGroupSeqId);
                     try {
                         Map<String, Object> result = dispatcher.runSync("appendOrderItem",
appendOrderItemMap);
-                        request.setAttribute("shoppingCart", (ShoppingCart) result.get("shoppingCart"));
+                        request.setAttribute("shoppingCart", result.get("shoppingCart"));
                         ShoppingCartEvents.destroyCart(request, response);
                     } catch (GenericServiceException e) {
                         Debug.logError(e, "Failed to execute service appendOrderItem", module);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
Sat Dec  8 12:06:01 2012
@@ -272,7 +272,7 @@ public class ProductDisplayWorker {
                 Integer quantity = entry.getValue();
                 BigDecimal occs = productQuantities.get(prodId);
                 //For quantity we should test if we allow to add decimal quantity for this
product an productStore : if not then round to 0
-                if(! ProductWorker.isDecimalQuantityOrderAllowed(delegator, (String)prodId,
cart.getProductStoreId())){
+                if(! ProductWorker.isDecimalQuantityOrderAllowed(delegator, prodId, cart.getProductStoreId())){
                     occs = occs.setScale(0, UtilNumber.getBigDecimalRoundingMode("order.rounding"));
                 }
                 else {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
Sat Dec  8 12:06:01 2012
@@ -1446,7 +1446,7 @@ public class ProductPromoWorker {
                             if (ServiceUtil.isError(invReqResult)) {
                                 Debug.logError("Error calling isStoreInventoryAvailable service,
result is: " + invReqResult, module);
                                 throw new CartItemModifyException((String) invReqResult.get(ModelService.ERROR_MESSAGE));
-                            } else if (!"Y".equals((String) invReqResult.get("available")))
{
+                            } else if (!"Y".equals(invReqResult.get("available"))) {
                                 Debug.logWarning(UtilProperties.getMessage(resource_error,"OrderNotApplyingGwpBecauseProductIdIsOutOfStockForProductPromoAction",
UtilMisc.toMap("productId", productId, "productPromoAction", productPromoAction), cart.getLocale()),
module);
                                 productId = null;
                                 product = null;
@@ -1483,7 +1483,7 @@ public class ProductPromoWorker {
                         if (ServiceUtil.isError(invReqResult)) {
                             Debug.logError("Error calling isStoreInventoryAvailable service,
result is: " + invReqResult, module);
                             throw new CartItemModifyException((String) invReqResult.get(ModelService.ERROR_MESSAGE));
-                        } else if (!"Y".equals((String) invReqResult.get("available"))) {
+                        } else if (!"Y".equals(invReqResult.get("available"))) {
                             optionProductIdIter.remove();
                         }
                     } catch (GenericServiceException e) {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java Sat Dec 
8 12:06:01 2012
@@ -20,11 +20,8 @@ package org.ofbiz.product.image;
 
 import java.awt.image.BufferedImage;
 import java.awt.image.ImagingOpException;
-import java.awt.image.RenderedImage;
 import java.io.File;
 import java.io.IOException;
-import java.lang.NullPointerException;
-import java.lang.SecurityException;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -40,8 +37,8 @@ import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
-import org.ofbiz.service.ServiceUtil;
 import org.ofbiz.common.image.ImageTransform;
+import org.ofbiz.service.ServiceUtil;
 
 /**
  * ScaleImage Class
@@ -317,8 +314,8 @@ public class ScaleImage {
             bufImg = (BufferedImage) resultBufImgMap.get("bufferedImage");
 
             // get Dimensions
-            imgHeight = (double) bufImg.getHeight();
-            imgWidth = (double) bufImg.getWidth();
+            imgHeight = bufImg.getHeight();
+            imgWidth = bufImg.getWidth();
             if (imgHeight == 0.0 || imgWidth == 0.0) {
                 String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_current_image_dimension_is_null",
locale) + " : imgHeight = " + imgHeight + " ; imgWidth = " + imgWidth;
                 Debug.logError(errMsg, module);
@@ -365,7 +362,7 @@ public class ScaleImage {
 
                     // write new image
                     try {
-                        ImageIO.write((RenderedImage) bufNewImg, imgExtension, new File(imageServerPath
+ "/" + newFilePathPrefix + filenameToUse));
+                        ImageIO.write(bufNewImg, imgExtension, new File(imageServerPath +
"/" + newFilePathPrefix + filenameToUse));
                     } catch (IllegalArgumentException e) {
                         String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_parameter_is_null",
locale) + e.toString();
                         Debug.logError(errMsg, module);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java
(original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java
Sat Dec  8 12:06:01 2012
@@ -98,7 +98,7 @@ public class CropImage {
             
             BufferedImage bufNewImg = bufImg.getSubimage(x, y, w, h);
             String mimeType = imageName.substring(imageName.lastIndexOf(".") + 1);
-            ImageIO.write((RenderedImage) bufNewImg, mimeType, new File(imageServerPath +
"/" + productId + "/" + filenameToUse));
+            ImageIO.write(bufNewImg, mimeType, new File(imageServerPath + "/" + productId
+ "/" + filenameToUse));
             
             double imgHeight = bufNewImg.getHeight();
             double imgWidth = bufNewImg.getWidth();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java
(original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java
Sat Dec  8 12:06:01 2012
@@ -154,7 +154,7 @@ public class FrameImage {
             Image newImg2 = bufImg2.getScaledInstance(width , height , Image.SCALE_SMOOTH);
             BufferedImage bufNewImg = combineBufferedImage(newImg1, newImg2, bufImgType);
             String mimeType = imageName.substring(imageName.lastIndexOf(".") + 1);
-            ImageIO.write((RenderedImage) bufNewImg, mimeType, new File(imageServerPath +
"/" + productId + "/" + filenameToUse));
+            ImageIO.write(bufNewImg, mimeType, new File(imageServerPath + "/" + productId
+ "/" + filenameToUse));
             
             double imgHeight = bufNewImg.getHeight();
             double imgWidth = bufNewImg.getWidth();
@@ -384,7 +384,7 @@ public class FrameImage {
             Image newImg2 = bufImg2.getScaledInstance(width , height , Image.SCALE_SMOOTH);
             BufferedImage bufNewImg = combineBufferedImage(newImg1, newImg2, bufImgType);
             String mimeType = imageName.substring(imageName.lastIndexOf(".") + 1);
-            ImageIO.write((RenderedImage) bufNewImg, mimeType, new File(imageServerPath +
"/preview/" + "/previewImage.jpg"));
+            ImageIO.write(bufNewImg, mimeType, new File(imageServerPath + "/preview/" + "/previewImage.jpg"));
             
         }
          else{

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=1418650&r1=1418649&r2=1418650&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
Sat Dec  8 12:06:01 2012
@@ -359,8 +359,8 @@ public class ImageManagementServices {
             bufImg = (BufferedImage) resultBufImgMap.get("bufferedImage");
             
             // get Dimensions
-            imgHeight = (double) bufImg.getHeight();
-            imgWidth = (double) bufImg.getWidth();
+            imgHeight = bufImg.getHeight();
+            imgWidth = bufImg.getWidth();
             if (imgHeight == 0.0 || imgWidth == 0.0) {
                 String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_current_image_dimension_is_null",
locale) + " : imgHeight = " + imgHeight + " ; imgWidth = " + imgWidth;
                 Debug.logError(errMsg, module);
@@ -390,7 +390,7 @@ public class ImageManagementServices {
                     
                     // write new image
                     try {
-                        ImageIO.write((RenderedImage) bufNewImg, imgExtension, new File(imageServerPath
+ "/" + productId + "/" + filenameToUse));
+                        ImageIO.write(bufNewImg, imgExtension, new File(imageServerPath +
"/" + productId + "/" + filenameToUse));
                         File deleteFile = new File(imageServerPath + "/"  + filenameToUse);
                         deleteFile.delete();
                         //FIXME can be removed ?
@@ -941,7 +941,7 @@ public class ImageManagementServices {
             
             if (imageType.equals(mimeType)) {
                 BufferedImage bufImg = ImageIO.read(new File(imageServerPath + "/" + productId
+ "/" + dataResourceName));
-                ImageIO.write((RenderedImage) bufImg, imgExtension, new File(imageServerPath
+ "/" + productId + "/" + filenameToUse));
+                ImageIO.write(bufImg, imgExtension, new File(imageServerPath + "/" + productId
+ "/" + filenameToUse));
                 
                 File file = new File(imageServerPath + "/" + productId + "/" + dataResourceName);
                 file.delete();
@@ -1000,7 +1000,7 @@ public class ImageManagementServices {
                         String imageUrlAssoc = imageServerUrl + "/" + productId + "/" + filenameToUseAssoc;
                         
                         BufferedImage bufImgAssoc = ImageIO.read(new File(imageServerPath
+ "/" + productId + "/" + drDataResourceNameAssoc));
-                        ImageIO.write((RenderedImage) bufImgAssoc, imgExtension, new File(imageServerPath
+ "/" + productId + "/" + filenameToUseAssoc));
+                        ImageIO.write(bufImgAssoc, imgExtension, new File(imageServerPath
+ "/" + productId + "/" + filenameToUseAssoc));
                         
                         File fileAssoc = new File(imageServerPath + "/" + productId + "/"
+ drDataResourceNameAssoc);
                         fileAssoc.delete();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java
(original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java
Sat Dec  8 12:06:01 2012
@@ -19,7 +19,6 @@
 package org.ofbiz.product.imagemanagement;
 
 import java.awt.image.BufferedImage;
-import java.awt.image.RenderedImage;
 import java.io.File;
 import java.util.List;
 import java.util.Map;
@@ -78,7 +77,7 @@ public class ReplaceImage{
         
         try {
             BufferedImage bufImg = ImageIO.read(new File(imageServerPath + "/" + productId
+ "/" + dataResourceNameReplace));
-            ImageIO.write((RenderedImage) bufImg, "jpg", new File(imageServerPath + "/" +
productId + "/" + dataResourceNameExist));
+            ImageIO.write(bufImg, "jpg", new File(imageServerPath + "/" + productId + "/"
+ dataResourceNameExist));
             
             List<GenericValue> contentAssocReplaceList = delegator.findByAnd("ContentAssoc",
UtilMisc.toMap("contentId", contentIdReplace, "contentAssocTypeId", "IMAGE_THUMBNAIL"), null,
false);
             if (contentAssocReplaceList.size() > 0) {
@@ -96,11 +95,11 @@ public class ReplaceImage{
                     
                     if (UtilValidate.isNotEmpty(dataResourceAssocExist)) {
                         BufferedImage bufImgAssocReplace = ImageIO.read(new File(imageServerPath
+ "/" + productId + "/" + dataResourceAssocReplace.get("drDataResourceName")));
-                        ImageIO.write((RenderedImage) bufImgAssocReplace, "jpg", new File(imageServerPath
+ "/" + productId + "/" + dataResourceAssocExist.get("drDataResourceName")));
+                        ImageIO.write(bufImgAssocReplace, "jpg", new File(imageServerPath
+ "/" + productId + "/" + dataResourceAssocExist.get("drDataResourceName")));
                     }
                     else{
                         BufferedImage bufImgAssocReplace = ImageIO.read(new File(imageServerPath
+ "/" + productId + "/" + dataResourceAssocReplace.get("drDataResourceName")));
-                        ImageIO.write((RenderedImage) bufImgAssocReplace, "jpg", new File(imageServerPath
+ "/" + productId + "/" + dataResourceNameExist.substring(0, dataResourceNameExist.length()
- 4) + "-" + contentAssocReplace.get("mapKey") + ".jpg"));
+                        ImageIO.write(bufImgAssocReplace, "jpg", new File(imageServerPath
+ "/" + productId + "/" + dataResourceNameExist.substring(0, dataResourceNameExist.length()
- 4) + "-" + contentAssocReplace.get("mapKey") + ".jpg"));
                     }
                 }
             }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java
(original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java
Sat Dec  8 12:06:01 2012
@@ -105,7 +105,7 @@ public class RotateImage {
             g.dispose();
             
             String mimeType = imageName.substring(imageName.lastIndexOf(".") + 1);
-            ImageIO.write((RenderedImage) bufNewImg, mimeType, new File(imageServerPath +
"/" + productId + "/" + filenameToUse));
+            ImageIO.write(bufNewImg, mimeType, new File(imageServerPath + "/" + productId
+ "/" + filenameToUse));
             
             double imgHeight = bufNewImg.getHeight();
             double imgWidth = bufNewImg.getWidth();

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java Sat Dec 
8 12:06:01 2012
@@ -65,7 +65,7 @@ public class ContainerLoader implements 
 
         List<String> loaders = null;
         for (Map loaderMap: config.loaders) {
-            if (module.equals((String)loaderMap.get("class"))) {
+            if (module.equals(loaderMap.get("class"))) {
                 loaders = StringUtil.split((String)loaderMap.get("profiles"), ",");
             }
         }

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
(original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
Sat Dec  8 12:06:01 2012
@@ -242,7 +242,7 @@ public class PreferenceServices {
 
         try {
             for (Map.Entry<String, Object> mapEntry: userPrefMap.entrySet()) {
-                GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId,
mapEntry.getKey(), userPrefGroupTypeId, (String) mapEntry.getValue()));
+                GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId,
mapEntry.getKey(), userPrefGroupTypeId, mapEntry.getValue()));
                 delegator.createOrStore(rec);
             }
         } catch (GenericEntityException e) {

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java Sat Dec  8 12:06:01
2012
@@ -278,7 +278,7 @@ TEMP_VIEW_LOOP:
                             mveIt.remove();
                             curViewEntity.populateFields(this);
                             for (ModelViewEntity.ModelMemberEntity mve: curViewEntity.getAllModelMemberEntities())
{
-                                ModelEntity me = (ModelEntity) entityCache.get(mve.getEntityName());
+                                ModelEntity me = entityCache.get(mve.getEntityName());
                                 me.addViewEntity(curViewEntity);
                             }
                             entityCache.put(curViewEntity.getEntityName(), curViewEntity);

Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sat Dec  8 12:06:01 2012
@@ -238,7 +238,7 @@ public final class Start {
                     return;
                 }
                 try {
-                    String loaderClassName = (String) loaderMap.get("class");
+                    String loaderClassName = loaderMap.get("class");
                     Class<?> loaderClass = classloader.loadClass(loaderClassName);
                     StartupLoader loader = (StartupLoader) loaderClass.newInstance();
                     loader.load(config, loaderArgs.toArray(new String[loaderArgs.size()]));

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java Sat Dec 
8 12:06:01 2012
@@ -261,7 +261,7 @@ public class OfbizUrlTransform implement
     String value = "";
         try{
             NodeList nlList= eElement.getElementsByTagName(sTag).item(0).getChildNodes();
-            Node nValue = (Node) nlList.item(0);
+            Node nValue = nlList.item(0);
             return value = nValue.getNodeValue();
         } catch (Exception e) {
             return value;

Modified: ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
Sat Dec  8 12:06:01 2012
@@ -173,7 +173,7 @@ public class JanrainHelper {
             }
             post.close();
             Document tagXml = UtilXml.readXmlDocument(buf.toString());
-            Element response = (Element) tagXml.getDocumentElement();
+            Element response = tagXml.getDocumentElement();
             if (!response.getAttribute("stat").equals("ok")) {
                 throw new RuntimeException("Unexpected API error");
             }

Modified: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
(original)
+++ ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
Sat Dec  8 12:06:01 2012
@@ -103,7 +103,7 @@ public class GoogleBaseSearchEvents {
                 String webSiteMountPoint = request.getParameter("webSiteMountPoint");
                 String countryCode = request.getParameter("countryCode");
                 String productStoreId = request.getParameter("productStoreId");
-                String allowRecommended = (String) request.getParameter("allowRecommended");
+                String allowRecommended = request.getParameter("allowRecommended");
 
                 // Export all or selected products to Google Base
                 try {

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java Sat Dec  8 12:06:01
2012
@@ -69,7 +69,7 @@ public class PosDialog {
     }
 
     public static PosDialog getInstance(XPage page, boolean modal, int padding) {
-        PosDialog dialog = (PosDialog) instances.get(page);
+        PosDialog dialog = instances.get(page);
         if (dialog == null) {
             dialog = instances.putIfAbsentAndGet(page, new PosDialog(page, modal, padding));
         }

Modified: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/WebPosEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/WebPosEvents.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/WebPosEvents.java (original)
+++ ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/WebPosEvents.java Sat Dec  8 12:06:01
2012
@@ -55,7 +55,7 @@ public class WebPosEvents {
         HttpSession session = request.getSession(true);
         
         // get the posTerminalId
-        String posTerminalId = (String) request.getParameter("posTerminalId");
+        String posTerminalId = request.getParameter("posTerminalId");
         session.removeAttribute("shoppingCart");
         session.removeAttribute("webPosSession");
         WebPosSession webPosSession = WebPosEvents.getWebPosSession(request, posTerminalId);
@@ -186,7 +186,7 @@ public class WebPosEvents {
                                             List<String> featureOrder = FastList.newInstance();
                                             featureOrder = UtilMisc.toList(featureSet);
                                             for (int i=0; i < featureOrder.size(); i++)
{
-                                                String featureKey = (String) featureOrder.get(i);
+                                                String featureKey = featureOrder.get(i);
                                                 GenericValue featureValue = delegator.findOne("ProductFeatureType",
UtilMisc.toMap("productFeatureTypeId", featureOrder.get(i)), true);
                                                 if (UtilValidate.isNotEmpty(featureValue)
&& 
                                                     UtilValidate.isNotEmpty(featureValue.get("description")))
{

Modified: ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java?rev=1418650&r1=1418649&r2=1418650&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
(original)
+++ ofbiz/trunk/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java
Sat Dec  8 12:06:01 2012
@@ -329,7 +329,7 @@ public class WebPosTransaction {
             boolean isExternal = true;
             Iterator<GenericValue> i = values.iterator();
             while (i.hasNext() && isExternal) {
-                GenericValue v = (GenericValue) i.next();
+                GenericValue v = i.next();
                 //Debug.logInfo("Testing [" + paymentMethodTypeId + "] - " + v, module);
                 if (!externalCode.equals(v.getString("paymentServiceTypeEnumId"))) {
                     isExternal = false;



Mime
View raw message