@Override
public AddableBasketItem getItem (final Product product) {
// Trace message
- this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product));
+ this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
// product must not be null
if (product == null) {
// Abort here
- throw new NullPointerException("product is null");
+ throw new NullPointerException("product is null"); //NOI18N
}
// Debug message
- this.getLogger().debug("Product " + product.getTitle() + " has id " + product.getId());
+ this.getLogger().debug("Product " + product.getTitle() + " has id " + product.getId()); //NOI18N
// Get item instance from map by product's id number (both are the same)
AddableBasketItem item = this.items.get(product.getId());
// Is it null?
if (item == null) {
// Trace message
- this.getLogger().trace("item=null - EXIT!");
+ this.getLogger().trace("item=null - EXIT!"); //NOI18N
} else {
// Trace message
- this.getLogger().trace(MessageFormat.format("item={0} with id={1},amount={2} - EXIT!", item, item.getId(), item.getAmount()));
+ this.getLogger().trace(MessageFormat.format("item={0} with id={1},amount={2} - EXIT!", item, item.getId(), item.getAmount())); //NOI18N
}
// Return it