< prev index next >
src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java
Print this page
*** 93,105 ****
private static boolean loadProviderFromProperty() {
String cn = System.getProperty("java.nio.channels.spi.SelectorProvider");
if (cn == null)
return false;
try {
! Class<?> c = Class.forName(cn, true,
! ClassLoader.getSystemClassLoader());
! provider = (SelectorProvider)c.newInstance();
return true;
} catch (ClassNotFoundException x) {
throw new ServiceConfigurationError(null, x);
} catch (IllegalAccessException x) {
throw new ServiceConfigurationError(null, x);
--- 93,106 ----
private static boolean loadProviderFromProperty() {
String cn = System.getProperty("java.nio.channels.spi.SelectorProvider");
if (cn == null)
return false;
try {
! @SuppressWarnings("deprecation")
! Object tmp = Class.forName(cn, true,
! ClassLoader.getSystemClassLoader()).newInstance();
! provider = (SelectorProvider)tmp;
return true;
} catch (ClassNotFoundException x) {
throw new ServiceConfigurationError(null, x);
} catch (IllegalAccessException x) {
throw new ServiceConfigurationError(null, x);
< prev index next >