< prev index next >

src/java.base/share/classes/sun/net/ftp/FtpClientProvider.java

Print this page

        

@@ -65,12 +65,13 @@
         String cm = System.getProperty("sun.net.ftpClientProvider");
         if (cm == null) {
             return false;
         }
         try {
-            Class<?> c = Class.forName(cm, true, null);
-            provider = (FtpClientProvider) c.newInstance();
+            @SuppressWarnings("deprecation")
+            Object o = Class.forName(cm, true, null).newInstance();
+            provider = (FtpClientProvider)o;
             return true;
         } catch (ClassNotFoundException |
                  IllegalAccessException |
                  InstantiationException |
                  SecurityException x) {
< prev index next >