提交 64f4e28d 编写于 作者: I igerasim

8169026: Handle smartcard clean up better

Reviewed-by: valeriep, ahgross
上级 fea9ec55
/*
* 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
......@@ -280,13 +280,14 @@ final class CardImpl extends Card {
}
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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册