< prev index next >
src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java
Print this page
*** 109,120 ****
// if that did not work, try the Sun PC/SC factory
try {
type = "PC/SC";
Provider sun = Security.getProvider("SunPCSC");
if (sun == null) {
! Class<?> clazz = Class.forName("sun.security.smartcardio.SunPCSC");
! sun = (Provider)clazz.newInstance();
}
factory = TerminalFactory.getInstance(type, null, sun);
} catch (Exception e) {
// ignore
}
--- 109,121 ----
// if that did not work, try the Sun PC/SC factory
try {
type = "PC/SC";
Provider sun = Security.getProvider("SunPCSC");
if (sun == null) {
! @SuppressWarnings("deprecation")
! Object o = Class.forName("sun.security.smartcardio.SunPCSC").newInstance();
! sun = (Provider)o;
}
factory = TerminalFactory.getInstance(type, null, sun);
} catch (Exception e) {
// ignore
}
< prev index next >