< prev index next >
src/jdk.net/share/classes/jdk/net/RdmaSocketOptions.java
Print this page
@@ -239,10 +239,12 @@
Class<PlatformRdmaSocketOptions> c;
try {
c = (Class<PlatformRdmaSocketOptions>)Class.forName(cn);
return c.getConstructor(new Class<?>[] { }).newInstance();
} catch (ReflectiveOperationException x) {
+ if (x.getCause() instanceof UnsupportedOperationException)
+ throw (UnsupportedOperationException)x.getCause();
throw new AssertionError(x);
}
}
private static PlatformRdmaSocketOptions create() {
@@ -250,12 +252,17 @@
new PrivilegedAction<String>() {
public String run() {
return System.getProperty("os.name");
}
});
- if ("Linux".equals(osname))
+ if ("Linux".equals(osname)) {
+ try {
return newInstance("jdk.net.LinuxRdmaSocketOptions");
+ } catch (UnsupportedOperationException uoe) {
+ return new PlatformRdmaSocketOptions();
+ }
+ }
return new PlatformRdmaSocketOptions();
}
private static final PlatformRdmaSocketOptions instance = create();
< prev index next >