diff options
Diffstat (limited to 'smcc/src/main/java/at')
3 files changed, 16 insertions, 25 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java b/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java index d3cb9a81..56680313 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/reader/DefaultCardReader.java @@ -123,21 +123,19 @@ public class DefaultCardReader implements CardReader { } private boolean dropExclusive(Card card) throws CardException { - if (SMCCHelper.isWindows8()) { - log.debug("Win8 - giving up exclusive acess"); - try { - card.endExclusive(); - } catch (IllegalStateException e) { - log.debug("Didn't have exclusive access"); - return false; - } + log.debug("Dropping exclusive card access"); + try { + card.endExclusive(); + } catch (IllegalStateException e) { + log.debug("Didn't have exclusive access"); + return false; } return true; } private void regainExclusive(Card card, boolean doRegainExclusive) throws CardException { - if (SMCCHelper.isWindows8() && doRegainExclusive) { - log.debug("Win8 - trying to regain exclusive acess"); + if (doRegainExclusive) { + log.debug("Trying to regain exclusive card access"); card.beginExclusive(); } } diff --git a/smcc/src/main/java/at/gv/egiz/smcc/reader/PinpadCardReader.java b/smcc/src/main/java/at/gv/egiz/smcc/reader/PinpadCardReader.java index f02344eb..56d2233c 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/reader/PinpadCardReader.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/reader/PinpadCardReader.java @@ -745,21 +745,19 @@ public class PinpadCardReader extends DefaultCardReader { } private boolean dropExclusive(Card card) throws CardException { - if (SMCCHelper.isWindows8()) { - log.debug("Win8 - giving up exclusive acess"); - try { - card.endExclusive(); - } catch (IllegalStateException e) { - log.debug("Didn't have exclusive access"); - return false; - } + log.debug("Dropping exclusive card access"); + try { + card.endExclusive(); + } catch (IllegalStateException e) { + log.debug("Didn't have exclusive access"); + return false; } return true; } private void regainExclusive(Card card, boolean doRegainExclusive) throws CardException { - if (SMCCHelper.isWindows8() && doRegainExclusive) { - log.debug("Win8 - trying to regain exclusive acess"); + if (doRegainExclusive) { + log.debug("Trying to regain exclusive card access"); card.beginExclusive(); } } diff --git a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java index e4e11ea1..9f3f7dbd 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java @@ -210,9 +210,4 @@ public class SMCCHelper { public static void setUseSWCard(boolean useSWCard) { SMCCHelper.useSWCard = useSWCard; } - - public static boolean isWindows8() { - String osName = System.getProperty("os.name"); - return osName.contains("Windows 8"); - } } |