changeset 9913:dfb9f24d56b5 jdk8u20-b24 jdk8u20-b25

Merge
author coffeys
date Wed, 23 Jul 2014 21:17:33 +0100
parents e51f975a2853 41903ff88ae8
children d888ef204713 5d8548a4bd4c 993110412e5d
files
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/smartcardio/CardImpl.java	Tue Jul 22 20:53:05 2014 +0100
+++ b/src/share/classes/sun/security/smartcardio/CardImpl.java	Wed Jul 23 21:17:33 2014 +0100
@@ -244,9 +244,6 @@
                     "sun.security.smartcardio.invertCardReset", "false")));
 
     public void disconnect(boolean reset) throws CardException {
-        if (invertReset) {
-            reset = !reset;
-        }
         if (reset) {
             checkSecurity("reset");
         }
@@ -254,6 +251,10 @@
             return;
         }
         checkExclusive();
+        // to preserve old behaviour, don't change flag until here
+        if (invertReset) {
+            reset = !reset;
+        }
         try {
             SCardDisconnect(cardId, (reset ? SCARD_RESET_CARD : SCARD_LEAVE_CARD));
         } catch (PCSCException e) {