From 2def87ec7c69292f6521742645deb2327bb7c221 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 24 Aug 2015 14:22:26 +0200 Subject: [PATCH] =?utf8?q?No=20need=20for=20a=20local=20variable=20Signed-?= =?utf8?q?off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../addressbook/client/gui/AddressbookFrame.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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(); } }); -- 2.39.5