On Dec 9, 2010, at 4:14 PM, [email protected] wrote:

> Author: doogie
> Date: Thu Dec  9 15:14:47 2010
> New Revision: 1043999
> 
> URL: http://svn.apache.org/viewvc?rev=1043999&view=rev
> Log:
> Yet another bad bug.  The name/value pair was never actually turned into
> a map.  findByAnd(entityName, field, value, list) was never a valid
> call.  However, this code still compiled, as it ended up using the
> vararg variant of findByAnd.  If this code had ever been run, then it
> would have blown up.
> 
> broken since: 984366, initial commit
> date: Wed Aug 11 10:39:10 2010 +0000
> 
> Modified:
>    
> ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java
> 
> Modified: 
> ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java
> URL: 
> http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java?rev=1043999&r1=1043998&r2=1043999&view=diff
> ==============================================================================
> --- 
> ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java
>  (original)
> +++ 
> ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java
>  Thu Dec  9 15:14:47 2010
> @@ -1269,7 +1269,8 @@ public class EbayStoreAutoPreferences {
>                         } else if (priceType.equals("RETAIL_PRICE")) {
>                             //ignore
>                         } else if (priceType.equals("SELLER_COST")) {
> -                            List<GenericValue> supplierProduct = 
> delegator.findByAnd("SupplierProduct", "productId", SKUItem, 
> UtilMisc.toList("availableFromDate DESC"));
> +                            // FIXME
> +                            List<GenericValue> supplierProduct = 
> delegator.findByAnd("SupplierProduct", UtilMisc.toMap("productId", SKUItem), 
> UtilMisc.toList("availableFromDate DESC"));

And "-availableFromDate" should be used instead of "availableFromDate DESC".

Jacopo

>                             String lastPrice = 
> supplierProduct.get(0).getString("lastPrice");
>                             doBasePrice = Double.parseDouble(lastPrice);
>                         } else if (priceType.equals("SECOND_CHANCE_PRICE")) {
> 
> 

Reply via email to