Mercurial > hg > openjdk > jdk6 > jdk
changeset 1734:22eb21adb15a
8169026: Handle smartcard clean up better
Reviewed-by: valeriep, ahgross
author | igerasim |
---|---|
date | Fri, 18 Nov 2016 12:25:10 +0300 |
parents | c7bda8ea6e0b |
children | 364a8df129df |
files | src/share/classes/sun/security/smartcardio/CardImpl.java |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/security/smartcardio/CardImpl.java Mon Jul 24 13:56:39 2017 +0530 +++ b/src/share/classes/sun/security/smartcardio/CardImpl.java Fri Nov 18 12:25:10 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -284,13 +284,14 @@ } public String toString() { - return "PC/SC card in " + terminal.getName() + return "PC/SC card in " + terminal.name + ", protocol " + getProtocol() + ", state " + state; } protected void finalize() throws Throwable { try { if (state == State.OK) { + state = State.DISCONNECTED; SCardDisconnect(cardId, SCARD_LEAVE_CARD); } } finally {