-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
None
-
x86
-
windows_xp
Problem description:
====================
Sun's implementation of "PC/SC" smartcard reader I/O engine works wrong.
RI implementation of "public TerminalFactory CardTerminal.getTerminalFactory()" returns null instead reference on factory used for CardTerminal creation.
Please run the minimized test to reproduce failure.
Issue appears on Windows XP with Gemplus "GemPCTwin" smart card reader for serial port.
Minimized test:
===============
--- test.java ---
import javax.smartcardio.*;
import java.security.*;
import java.util.*;
public class test {
public static void main(String[] args) throws CardException,
NoSuchAlgorithmException {
TerminalFactory factory = TerminalFactory.getInstance("PC/SC", null);
List<CardTerminal> cardTermList = factory.terminals();
if( cardTermList.size() != 0) {
CardTerminal cardTerm = cardTermList.get(0);
TerminalFactory returned = cardTerm.getTerminalFactory();
if (returned == null) {
System.out.println("Failed. CardTerminal.getTerminalFactory() returns null.");
System.out.println("TerminalFactory object toString:" + factory.toString());
System.out.println("CardTerminal object toString:" + cardTerm.toString());
} else {
System.out.println("Passed.");
}
} else {
System.out.println("Cannot be reproduced - card terminal (reader) absent.");
}
}
}
--- test.java ---
Minimized test output:
======================
D:\temp\CardTerminal>javac test.java
D:\temp\CardTerminal>java -cp ./ test
Failed. CardTerminal.getTerminalFactory() returns null.
TerminalFactory object toString:TerminalFactory for type PC/SC from provider SunPCSC
CardTerminal object toString:PC/SC terminal Gemplus Serial Smart Card Reader 0
D:\temp\CardTerminal>java -version
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b84)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b84, mixed mode)
====================
Sun's implementation of "PC/SC" smartcard reader I/O engine works wrong.
RI implementation of "public TerminalFactory CardTerminal.getTerminalFactory()" returns null instead reference on factory used for CardTerminal creation.
Please run the minimized test to reproduce failure.
Issue appears on Windows XP with Gemplus "GemPCTwin" smart card reader for serial port.
Minimized test:
===============
--- test.java ---
import javax.smartcardio.*;
import java.security.*;
import java.util.*;
public class test {
public static void main(String[] args) throws CardException,
NoSuchAlgorithmException {
TerminalFactory factory = TerminalFactory.getInstance("PC/SC", null);
List<CardTerminal> cardTermList = factory.terminals();
if( cardTermList.size() != 0) {
CardTerminal cardTerm = cardTermList.get(0);
TerminalFactory returned = cardTerm.getTerminalFactory();
if (returned == null) {
System.out.println("Failed. CardTerminal.getTerminalFactory() returns null.");
System.out.println("TerminalFactory object toString:" + factory.toString());
System.out.println("CardTerminal object toString:" + cardTerm.toString());
} else {
System.out.println("Passed.");
}
} else {
System.out.println("Cannot be reproduced - card terminal (reader) absent.");
}
}
}
--- test.java ---
Minimized test output:
======================
D:\temp\CardTerminal>javac test.java
D:\temp\CardTerminal>java -cp ./ test
Failed. CardTerminal.getTerminalFactory() returns null.
TerminalFactory object toString:TerminalFactory for type PC/SC from provider SunPCSC
CardTerminal object toString:PC/SC terminal Gemplus Serial Smart Card Reader 0
D:\temp\CardTerminal>java -version
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b84)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b84, mixed mode)
- duplicates
-
JDK-6417746 (smartcardio) TerminalFactory.waitForCardPresent methods does not throw IllegallArgumentException
-
- Closed
-
- relates to
-
JDK-6425558 (smartcardio) CardTerminal Ctor does not throw NPE for null parameter
-
- Closed
-