You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/12/07 16:56:13 UTC
svn commit: r887967 - in /ofbiz/trunk/applications:
order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
product/src/org/ofbiz/product/config/ProductConfigWorker.java
Author: jleroux
Date: Mon Dec 7 15:56:12 2009
New Revision: 887967
URL: http://svn.apache.org/viewvc?rev=887967&view=rev
Log:
A patch from Erwan de FERRIERES "Resolve compiler warnings" (https://issues.apache.org/jira/browse/OFBIZ-3314) - OFBIZ-3314
ProductWorker.getProductvirtualVariantMethod
Those warning are due to a typo in the method name.
JLR : while I was at it, I also changed selectedProdcutId to selectedProductId
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java
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=887967&r1=887966&r2=887967&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 Mon Dec 7 15:56:12 2009
@@ -250,7 +250,7 @@
//Check for virtual products
if (ProductWorker.isVirtual(delegator, productId)) {
- if ("VV_FEATURETREE".equals(ProductWorker.getProductvirtualVariantMethod(delegator, productId))) {
+ if ("VV_FEATURETREE".equals(ProductWorker.getProductVirtualVariantMethod(delegator, productId))) {
// get the selected features.
List<String> selectedFeatures = new LinkedList<String>();
java.util.Enumeration paramNames = request.getParameterNames();
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java?rev=887967&r1=887966&r2=887967&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java Mon Dec 7 15:56:12 2009
@@ -129,14 +129,14 @@
GenericValue component = components.get(i);
if (option.isVirtualComponent(component)) {
String productParamName = "add_product_id" + k + "_" + cnt + "_" + variantIndex;
- String selectedProdcutId = request.getParameter(productParamName);
- if (UtilValidate.isEmpty(selectedProdcutId)) {
+ String selectedProductId = request.getParameter(productParamName);
+ if (UtilValidate.isEmpty(selectedProductId)) {
Debug.logWarning("ERROR: Request param [" + productParamName + "] not found!", module);
} else {
// handle also feature tree virtual variant methods
- if (ProductWorker.isVirtual((Delegator)request.getAttribute("delegator"), selectedProdcutId)) {
- if ("VV_FEATURETREE".equals(ProductWorker.getProductvirtualVariantMethod((Delegator)request.getAttribute("delegator"), selectedProdcutId))) {
+ if (ProductWorker.isVirtual((Delegator)request.getAttribute("delegator"), selectedProductId)) {
+ if ("VV_FEATURETREE".equals(ProductWorker.getProductVirtualVariantMethod((Delegator)request.getAttribute("delegator"), selectedProductId))) {
// get the selected features
List<String> selectedFeatures = FastList.newInstance();
Enumeration paramNames = request.getParameterNames();
@@ -149,19 +149,19 @@
// check if features are selected
if (UtilValidate.isEmpty(selectedFeatures)) {
- Debug.logWarning("ERROR: No features selected for productId [" + selectedProdcutId+ "]", module);
+ Debug.logWarning("ERROR: No features selected for productId [" + selectedProductId+ "]", module);
}
- String variantProductId = ProductWorker.getVariantFromFeatureTree(selectedProdcutId, selectedFeatures, (Delegator)request.getAttribute("delegator"));
+ String variantProductId = ProductWorker.getVariantFromFeatureTree(selectedProductId, selectedFeatures, (Delegator)request.getAttribute("delegator"));
if (UtilValidate.isNotEmpty(variantProductId)) {
- selectedProdcutId = variantProductId;
+ selectedProductId = variantProductId;
} else {
Debug.logWarning("ERROR: Variant product not found!", module);
request.setAttribute("_EVENT_MESSAGE_", UtilProperties.getMessage("OrderErrorUiLabels", "cart.addToCart.incompatibilityVariantFeature", UtilHttp.getLocale(request)));
}
}
}
- configWrapper.setSelected(k, cnt, i, selectedProdcutId);
+ configWrapper.setSelected(k, cnt, i, selectedProductId);
}
variantIndex ++;
}