The coding in SocketPermissionTest.java joinGroupMulticastTest() looks problematic :
https://github.com/openjdk/jdk/blob/master/test/jdk/java/net/SocketPermission/SocketPermissionTest.java#L224
// Positive ( requires a functional network interface )
Optional<NetworkInterface> onif = probe().ip4MulticastInterfaces().findFirst();
if (!onif.isPresent()) {
s.setNetworkInterface(onif.get());
In case of !onif.isPresent() , we call in the next line onif.get() , that leads always to a
> java.util.NoSuchElementException: No value present
> at java.util.Optional.get(Optional.java:135)
>
> at
> SocketPermissionTest.joinGroupMulticastTest(SocketPermissionTest.java:221)
https://github.com/openjdk/jdk/blob/master/test/jdk/java/net/SocketPermission/SocketPermissionTest.java#L224
// Positive ( requires a functional network interface )
Optional<NetworkInterface> onif = probe().ip4MulticastInterfaces().findFirst();
if (!onif.isPresent()) {
s.setNetworkInterface(onif.get());
In case of !onif.isPresent() , we call in the next line onif.get() , that leads always to a
> java.util.NoSuchElementException: No value present
> at java.util.Optional.get(Optional.java:135)
>
> at
> SocketPermissionTest.joinGroupMulticastTest(SocketPermissionTest.java:221)