< prev index next >
src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java
Print this page
@@ -92,13 +92,14 @@
private static AsynchronousChannelProvider loadProviderFromProperty() {
String cn = System.getProperty("java.nio.channels.spi.AsynchronousChannelProvider");
if (cn == null)
return null;
try {
- Class<?> c = Class.forName(cn, true,
- ClassLoader.getSystemClassLoader());
- return (AsynchronousChannelProvider)c.newInstance();
+ @SuppressWarnings("deprecation")
+ Object tmp = Class.forName(cn, true,
+ ClassLoader.getSystemClassLoader()).newInstance();
+ return (AsynchronousChannelProvider)tmp;
} catch (ClassNotFoundException x) {
throw new ServiceConfigurationError(null, x);
} catch (IllegalAccessException x) {
throw new ServiceConfigurationError(null, x);
} catch (InstantiationException x) {
< prev index next >