Try using UtilGenerics.cast(...)

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/26/2015 11:57 AM, MikeButler wrote:
Hi all
As a practical way of getting to know Ofbiz framework I am attempting to 
transfer a hot-deploy component from Ofbiz 12.10 to 13.07. Using Eclipse Luna I 
have so far reduced the build error count from 130 down to 3 but  I am missing 
some practical knowledge when using Maps.
cart.addProductPromoUse(productPromoUse.getString("productPromoId"), 
productPromoUse.getString("productPromoCodeId"), 
productPromoUse.getBigDecimal("totalDiscountAmount"), 
productPromoUse.getBigDecimal("quantityLeftInActions"));
Results in error:
  [javac17]   required: 
String,String,BigDecimal,BigDecimal,Map<ShoppingCartItem,BigDecimal> [javac17]  
 found: String,String,BigDecimal,BigDecimal [javac17]   reason: actual and formal 
argument lists differ in length
That is to be expected as the function addProductPromoUse() in org.ofbiz.order.shoppingcart has changed  in version 
13.07 to include the Map<ShoppingCartItem,BigDecimal>   I have failed to add the missing Map item.  The 
autocomplete has no workable suggestion.  The closest I have come is adding ", 
productPromoUse.("ShoppingCartItem" )"  which results in "error  missing identifier" which 
I guess is a step forward.
Can annyone please help with what the final map item should actually be? and 
how to work it out?
RegardsMike Butler                                      



--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Help-with-Version-changes-tp4667486.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to