equal
deleted
inserted
replaced
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8036979 8072384 8044773 8225214 |
26 * @bug 8036979 8072384 8044773 8225214 8233296 |
27 * @library /test/lib |
27 * @library /test/lib |
28 * @requires !vm.graal.enabled |
28 * @requires !vm.graal.enabled |
29 * @run main/othervm -Xcheck:jni OptionsTest |
29 * @run main/othervm -Xcheck:jni OptionsTest |
30 * @run main/othervm -Djdk.net.usePlainSocketImpl OptionsTest |
30 * @run main/othervm -Djdk.net.usePlainSocketImpl OptionsTest |
31 * @run main/othervm -Xcheck:jni -Djava.net.preferIPv4Stack=true OptionsTest |
31 * @run main/othervm -Xcheck:jni -Djava.net.preferIPv4Stack=true OptionsTest |
319 } else if (option.equals(StandardSocketOptions.IP_MULTICAST_IF)) { |
319 } else if (option.equals(StandardSocketOptions.IP_MULTICAST_IF)) { |
320 return socket.getNetworkInterface(); |
320 return socket.getNetworkInterface(); |
321 } else if (option.equals(StandardSocketOptions.IP_MULTICAST_TTL)) { |
321 } else if (option.equals(StandardSocketOptions.IP_MULTICAST_TTL)) { |
322 return Integer.valueOf(socket.getTimeToLive()); |
322 return Integer.valueOf(socket.getTimeToLive()); |
323 } else if (option.equals(StandardSocketOptions.IP_MULTICAST_LOOP)) { |
323 } else if (option.equals(StandardSocketOptions.IP_MULTICAST_LOOP)) { |
324 return Boolean.valueOf(socket.getLoopbackMode()); |
324 return !Boolean.valueOf(socket.getLoopbackMode()); |
325 } else { |
325 } else { |
326 throw new RuntimeException("unexpected socket option"); |
326 throw new RuntimeException("unexpected socket option"); |
327 } |
327 } |
328 } |
328 } |
329 throw new RuntimeException("unexpected socket type"); |
329 throw new RuntimeException("unexpected socket type"); |