]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
No need to declare outside try() block
authorRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 07:56:30 +0000 (09:56 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 07:58:00 +0000 (09:58 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java

index f3f75784314a745edd0c90b1bf8175f3f9dbb2cc..2df040c874b16c7609ad39d348b744952701ace5 100644 (file)
@@ -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;