From 65296cae258596954452629a7d53114944afad89 Mon Sep 17 00:00:00 2001 From: emaiannone Date: Sat, 11 Jan 2020 18:17:54 +0100 Subject: [PATCH] Refactor Member Ignoring Method smell in Device class --- .../java/com/secupwn/aimsicd/utils/Device.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/AIMSICD/src/main/java/com/secupwn/aimsicd/utils/Device.java b/AIMSICD/src/main/java/com/secupwn/aimsicd/utils/Device.java index a8cc70315..f5615a37d 100644 --- a/AIMSICD/src/main/java/com/secupwn/aimsicd/utils/Device.java +++ b/AIMSICD/src/main/java/com/secupwn/aimsicd/utils/Device.java @@ -159,15 +159,14 @@ public void refreshDeviceInfo(TelephonyManager tm, Context context) { dataState = getDataState(tm); } - private Optional getSimInformation(Supplier simInfoSupplier) { - try { - return Optional.ofNullable(simInfoSupplier.get()); - } catch (Exception e) { - // SIM methods can cause Exceptions on some devices - log.error("Failed to get SIM-Information", e); - } - return Optional.empty(); - } + private static Optional getSimInformation(Supplier simInfoSupplier) { + try { + return Optional.ofNullable(simInfoSupplier.get()); + } catch (Exception e) { + log.error("Failed to get SIM-Information", e); + } + return Optional.empty(); + } /** * SIM Country