]> git.mxchange.org Git - jaddressbook-share-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/menu/BaseMenu.java
Fixed and added more MySQL-related stuff
[jaddressbook-share-lib.git] / Addressbook / src / org / mxchange / addressbook / menu / BaseMenu.java
index 73f3422db93b0ea38bc6354659e6fb514e6e3c4b..de12ad4fdc5a4d2e500bee2e2ce2c81eef6493b7 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.addressbook.menu;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -65,6 +66,15 @@ public class BaseMenu extends BaseFrameworkSystem {
         * @param client Client instance to call back
         */
        public void show (final Client client) {
+               // Trace message
+               this.getLogger().trace(MessageFormat.format("client={0} CALLED!", client)); //NOI18N
+
+               // Client must not be null
+               if (client == null) {
+                       // Abort here
+                       throw new NullPointerException("client is null"); //NOI18N
+               }
+
                // Get values
                Iterator<SelectableMenuItem> iterator = this.menuList.iterator();
 
@@ -79,6 +89,9 @@ public class BaseMenu extends BaseFrameworkSystem {
                        // Show this item
                        item.show(client);
                }
+
+               // Trace message
+               this.getLogger().trace("EXIT!"); //NOI18N
        }
 
        /**
@@ -97,7 +110,13 @@ public class BaseMenu extends BaseFrameworkSystem {
         * @param client CLient to call back
         */
        protected void initMenu (final String menuType, final Client client) {
+               // Trace message
+               this.getLogger().trace(MessageFormat.format("menuType={0},client={1} - CALLED!", menuType, client)); //NOI18N
+
                // Init menu list
                this.menuList = new ArrayList<>(5);
+
+               // Trace message
+               this.getLogger().trace("EXIT!"); //NOI18N
        }
 }