63 |
|
m = ThreadLocalRandom.class.getDeclaredMethod( |
64 |
|
"next", new Class[] { int.class }); |
65 |
|
m.setAccessible(true); |
66 |
< |
} catch (SecurityException |
67 |
< |
| java.lang.reflect.InaccessibleObjectException acceptable) { |
68 |
< |
// Either jdk9 module system or security manager might deny access. |
66 |
> |
} catch (SecurityException acceptable) { |
67 |
> |
// Security manager may deny access |
68 |
|
return; |
69 |
+ |
} catch (Exception ex) { |
70 |
+ |
// jdk9 module system may deny access |
71 |
+ |
if (ex.getClass().getSimpleName() |
72 |
+ |
.equals("InaccessibleObjectException")) |
73 |
+ |
return; |
74 |
+ |
throw ex; |
75 |
|
} |
76 |
|
|
77 |
|
int i; |