From: Roland Haeder Date: Mon, 31 Aug 2015 07:56:30 +0000 (+0200) Subject: No need to declare outside try() block X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=70a55ac3583afda61197c1fddbb64d21984a0bbc;p=pizzaservice-war.git No need to declare outside try() block Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java b/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java index f3f75784..2df040c8 100644 --- a/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java +++ b/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java @@ -83,8 +83,6 @@ public class BasketItemAddedFilter extends BaseServletFilter implements Filter { // Debug message this.getLogger().debug(MessageFormat.format("item.id={0},item.itemId={1},item.itemType={2},item.amount={3}", item.getId(), item.getItemId(), item.getItemType(), item.getAmount())); //NOI18N - // Init instance - BasketBean basket; try { // Get session instance HttpSession session = ((HttpServletRequest) request).getSession(); @@ -105,7 +103,7 @@ public class BasketItemAddedFilter extends BaseServletFilter implements Filter { this.getLogger().debug(MessageFormat.format("bean={0}", bean)); //NOI18N // Get basket instance - basket = bean.getBasket(); + BasketBean basket = bean.getBasket(); // Debug message this.getLogger().debug(MessageFormat.format("basket={0}", basket)); //NOI18N @@ -119,7 +117,7 @@ public class BasketItemAddedFilter extends BaseServletFilter implements Filter { throw new NullPointerException(MessageFormat.format("item type of item={0} is null", item)); //NOI18N } else if ((item.getAmount() == null) || (item.getAmount() == 0)) { // Debug message - this.getLogger().debug(MessageFormat.format("Amount for item {0} is null", item)); //NOI18N + this.getLogger().debug(MessageFormat.format("Amount for item {0} is null - EXIT!", item)); //NOI18N // Amount is not entered return;