< prev index next >

src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java

Print this page

        

@@ -109,12 +109,13 @@
             // 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();
+                    @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 >