X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Faddressbook%2Fmenu%2FAddressbookMenu.java;h=8ef43f4ce3bdb430ab1fb3ee3113af519d6d3a83;hb=9127bf44a4f7793184d555aec41f54a0a37b1edd;hp=12257eb08d96aa8d80fbfba4cf5b53d00281e134;hpb=f2010ed4e24bb3e08ee7884184ee23f35193200d;p=addressbook-lib.git diff --git a/src/org/mxchange/addressbook/menu/AddressbookMenu.java b/src/org/mxchange/addressbook/menu/AddressbookMenu.java index 12257eb..8ef43f4 100644 --- a/src/org/mxchange/addressbook/menu/AddressbookMenu.java +++ b/src/org/mxchange/addressbook/menu/AddressbookMenu.java @@ -18,38 +18,30 @@ package org.mxchange.addressbook.menu; import java.text.MessageFormat; import java.util.List; -import org.apache.logging.log4j.Logger; -import org.mxchange.addressbook.BaseAddressbookSystem; import org.mxchange.addressbook.client.AddressbookClient; import org.mxchange.addressbook.menu.item.SelectableMenuItem; import org.mxchange.jcore.client.Client; /** * Utility class for menu structure - * + *

* @author Roland Haeder */ -public class AddressbookMenu extends BaseAddressbookSystem { +public class AddressbookMenu extends BaseMenu { /** * Copies entries for given type into the menu list - * + *

* @param menuList Menu list for later showing * @param menuType Type of menu * @param client Client instance to call back */ public static void addItemsToList (final List menuList, final String menuType, final Client client) { - // Get logger - Logger log = new AddressbookMenu().getLogger(); - - // Trace call - log.trace(MessageFormat.format("menuList={0},menuType={1},client={2} - CALLED!", menuList, menuType, client)); //NOI18N - // Some instances must be set - if (menuList == null) { + if (null == menuList) { // Abort here throw new NullPointerException("menuList is null"); //NOI18N - } else if (client == null) { + } else if (null == client) { // Abort here throw new NullPointerException("contact is null"); //NOI18N } else if (!(client instanceof AddressbookClient)) { @@ -63,9 +55,6 @@ public class AddressbookMenu extends BaseAddressbookSystem { // Get list size int size = menuList.size(); - // Debug message - log.debug(MessageFormat.format("Adding menu for '{0}' (old size: '{1}') ...", menuType, size)); //NOI18N - // Depends on type switch (menuType) { case "main": // Main menu //NOI18N @@ -95,7 +84,7 @@ public class AddressbookMenu extends BaseAddressbookSystem { break; default: // Not supported - log.error(MessageFormat.format("Menu type '{0}' ont supported", menuType)); //NOI18N + System.err.println(MessageFormat.format("Menu type '{0}' ont supported", menuType)); //NOI18N System.exit(1); }