From: Roland Haeder Date: Mon, 24 Aug 2015 12:22:26 +0000 (+0200) Subject: No need for a local variable X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2def87ec7c69292f6521742645deb2327bb7c221;p=jbonuscard-lib.git No need for a local variable Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java b/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java index 73dc71a..7a03338 100644 --- a/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java +++ b/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java @@ -216,11 +216,8 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra // Debug line this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N - // Get and cast manager instance - ManageableAddressbookContact manager = (ManageableAddressbookContact) this.getClient().getManager(); - // Has the user entered own data? - if (manager.isOwnContactAdded()) { + if (((ManageableAddressbookContact) self.getClient().getManager()).isOwnContactAdded()) { // Debug message this.getLogger().debug("Disabling menus: isOwnContactAdded()=false"); //NOI18N @@ -679,8 +676,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra @Override public void actionPerformed (final ActionEvent e) { try { - ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager(); - manager.doEnterOwnData(); + ((ManageableAddressbookContact) self.getClient().getManager()).doEnterOwnData(); } catch (final ContactAlreadyAddedException ex) { // Already added, log away // @TODO maybe output message here? @@ -707,9 +703,8 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra */ @Override public void actionPerformed (final ActionEvent e) { - ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager(); try { - manager.doChangeOwnData(); + ((ManageableAddressbookContact) self.getClient().getManager()).doChangeOwnData(); } catch (final IOException | BadTokenException | CorruptedDatabaseFileException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { self.logException(ex); } @@ -729,8 +724,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra */ @Override public void actionPerformed (final ActionEvent e) { - ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager(); - manager.doAddOtherAddress(); + ((ManageableAddressbookContact) self.getClient().getManager()).doAddOtherAddress(); } });