final Set<DeliveryMethod> deliveryMethods = cart.getDeliveryMethods();
if (deliveryMethods != null) {
for (Iterator<DeliveryMethod> iterator = deliveryMethods.iterator(); iterator.hasNext();) {
final DeliveryMethod deliveryMethod = (DeliveryMethod) iterator.next();
if(deliveryMethod != null){
final CartDeliveryMethodViewBean cartDeliveryMethodViewBean = new CartDeliveryMethodViewBean();
cartDeliveryMethodViewBean.setLabel(deliveryMethod.getName());
cartDeliveryMethodViewBean.setAmountWithCurrencySign(deliveryMethod.getPriceWithStandardCurrencySign(cart.getCurrency().getId()));
Object[] params = { deliveryMethod.getName() };
cartDeliveryMethodViewBean.setLabel(getSpecificMessage(ScopeWebMessage.COMMON, "shoppingcart.amount.deliveryMethods", params, locale));
cartDeliveryMethodViewBeans.add(cartDeliveryMethodViewBean);
}
}
cartViewBean.setCartDeliveryMethods(cartDeliveryMethodViewBeans);
}